MCP tool
lookup_values
Look up code valuesWrites
Decode codes (code → label, with validity periods and "not informed" codes) or find a code by label (e.g. the IBGE code of 'Campinas'). Pass a column id (or a table id + column), or a code system id. Several codes at once: codes=[…] (up to 200). Answers from inline code lists or the column's profiled top values when it can (free); otherwise it reads the code system's reference table or the dataset's `dicionario` table with one small SELECT at the source, which is billed to the org's budget like `query` and stored the same way (an identical lookup is served from cache). A reference table that is a file answers with how to fetch it.
Parameters
idstringrequired- A column id, a table id (then set `column`), or an identifier scheme id.
codestringoptional- Code to decode (several: comma-separated, or `codes`).
codesstring[]optional- Several codes to decode at once (up to 200).
columnstringoptional- Column name when `id` is a table.
labelstringoptional- Label text to find the code for (case-insensitive substring).
limitintegeroptional- Max rows (default 20, at most 200).
Input schema (JSON)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"code": {
"default": null,
"description": "Code to decode (several: comma-separated, or `codes`).",
"type": [
"string",
"null"
]
},
"codes": {
"default": null,
"description": "Several codes to decode at once (up to 200).",
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"column": {
"default": null,
"description": "Column name when `id` is a table.",
"type": [
"string",
"null"
]
},
"id": {
"description": "A column id, a table id (then set `column`), or an identifier scheme id.",
"type": "string"
},
"label": {
"default": null,
"description": "Label text to find the code for (case-insensitive substring).",
"type": [
"string",
"null"
]
},
"limit": {
"default": null,
"description": "Max rows (default 20, at most 200).",
"format": "int64",
"type": [
"integer",
"null"
]
}
},
"required": [
"id"
],
"type": "object"
}