Skip to main content
Glama

Malhas temáticas

ibge_malhas_tema
Read-onlyIdempotent

Lists what a THEMATIC territorial recorte of Brazil contains: how many features, with which codes and names, and the URL to download its geometry.

Available recortes:

  • biomas: the six continental biomes

  • amazonia_legal: Legal Amazon boundary

  • semiarido: semi-arid area

  • costeiro: coastal municipalities

  • fronteira: border-strip municipalities

  • metropolitana: metropolitan regions

  • ride: Integrated Development Regions

  • listar: the catalogue itself, without querying the source

Filtering with codigo: only the recortes that have a per-feature code accept it — biomas (the biome code) and the two municipality ones, costeiro and fronteira (the 7-digit IBGE municipality code). Ask without codigo to see what exists; biome codes come from the source, not from a fixed table.

GEOMETRY IS NOT IN THE RESPONSE, on purpose: one biome polygon alone is over 9 MB. The response carries the attributes plus a canonical WFS URL that returns the recorte with geometry in GeoJSON.

Use a different tool when:

  • Administrative meshes WITH geometry (country/region/state/municipality outlines) → ibge_malhas

Behavior: read-only and idempotent — a live GET against the public IBGE Geosserviços WFS (IBGE Geociências), which is a different service from the Malhas API and the only one that publishes these recortes. Returns Markdown plus a typed structuredContent payload.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
temaYesRecorte temático do território: - biomas: os seis biomas continentais - amazonia_legal: limite da Amazônia Legal - semiarido: área do semiárido - costeiro: municípios da zona costeira - fronteira: municípios da faixa de fronteira - metropolitana: regiões metropolitanas - ride: Regiões Integradas de Desenvolvimento - listar: lista os recortes disponíveis, sem consultar a fonte
codigoNoFiltra uma feição do recorte. Só os recortes que têm código próprio aceitam: biomas (cd_bioma, ex. "1") e os dois de municípios, costeiro e fronteira (código IBGE de 7 dígitos). Nos demais a chamada é recusada com a lista do que aceita.
limiteNoQuantas feições trazer (padrão 50, máx. 600). O total do recorte vem sempre, mesmo quando o limite corta a lista.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
temaYesRecorte solicitado (ou 'listar')
temasNoLista de recortes disponíveis (somente no modo 'listar')
camadaNoCamada WFS do IBGE Geosserviços consultada
codigoNoCódigo usado como filtro, quando informado
feicoesNoTotal de feições do recorte na fonte
registrosNoAtributos de cada feição (sem geometria)
provenanceYesBloco de proveniência do portfólio: fonte, URL, período, extração, diagnóstico de origem e licença
attributionYesURLs canônicas das fontes desta resposta (lista de atribuição)
url_geometriaNoURL canônica do WFS que devolve a malha COM geometria, em GeoJSON
feicoes_retornadasNoQuantas vieram nesta resposta

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changed
    • changedOutput schema / properties / provenance / description
      Previous value: -"Bloco de proveniência (contrato v1.1): fonte, URL, período, extração, diagnóstico de origem e licença"New value: +"Bloco de proveniência do portfólio: fonte, URL, período, extração, diagnóstico de origem e licença"
    • addedOutput schema / properties / provenance / properties / derivation_note
      Added value: +{
      +  "description": "O que o servidor calculou; presente junto com derived",
      +  "type": "string"
      +}
    • addedOutput schema / properties / provenance / properties / derived
      Added value: +{
      +  "description": "Presente (true) só quando o servidor calculou o valor — estatísticas, rankings, comparações — em vez de repassá-lo como veio do IBGE",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / provenance / properties / field_sources / description
      Previous value: -"Proveniência por sub-fonte (contrato v1.2): presente só quando a resposta junta partes extraídas de origens ou em momentos distintos, uma entrada por grupo de campos; ausente quando a resposta vem de uma única extração"New value: +"Proveniência por sub-fonte: presente só quando a resposta junta partes extraídas de origens ou em momentos distintos, uma entrada por grupo de campos; ausente quando a resposta vem de uma única extração"
    • addedOutput schema / properties / provenance / properties / field_sources / items / description
      Added value: +"Proveniência de um grupo de campos da resposta: de onde veio e quando foi extraído"
    • addedOutput schema / properties / provenance / properties / field_sources / items / properties / data_vintage / description
      Added value: +"Vintage/competência da sub-fonte"
    • addedOutput schema / properties / provenance / properties / field_sources / items / properties / dataset_id / description
      Added value: +"Identificador do conjunto da sub-fonte"
    • addedOutput schema / properties / provenance / properties / field_sources / items / properties / fields / description
      Added value: +"Campos do payload atribuídos a esta sub-fonte"
    • addedOutput schema / properties / provenance / properties / field_sources / items / properties / retrieved_at / description
      Added value: +"ISO-8601 da extração desta sub-fonte na origem"
    • addedOutput schema / properties / provenance / properties / field_sources / items / properties / served_from_cache / description
      Added value: +"true se esta sub-fonte veio do cache do servidor (retrieved_at é o da extração original); false se foi buscada nesta chamada; null se o servidor não distingue"
    • addedOutput schema / properties / provenance / properties / field_sources / items / properties / source_url / description
      Added value: +"URL canônica da sub-fonte que originou estes campos"
    • addedOutput schema / properties / provenance / properties / notices
      Added value: +{
      +  "description": "Avisos que o IBGE publica junto com o dado (quebra de série, unidade, atualização), copiados como vieram; ausente quando não há aviso",
      +  "items": {
      +    "type": "string"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedOutput schema / properties / provenance / properties / retrieval / description
      Previous value: -"Diagnóstico de origem desta chamada (contrato v1.1): idas à API do IBGE, tentativas somadas e anomalias contornadas; unstable=true quando houve anomalia. null quando nada foi medido (resposta servida só do cache)"New value: +"Diagnóstico de origem desta chamada: idas à API do IBGE, tentativas somadas e anomalias contornadas; unstable=true quando houve anomalia. null quando nada foi medido (resposta servida só do cache)"
    • addedOutput schema / properties / provenance / properties / revision
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Se o dado ainda pode mudar no IBGE: current = versão vigente na extração, que o IBGE pode revisar depois; provisional = preliminar; final = não muda mais. note traz o específico da fonte quando há",
      +  "properties": {
      +    "note": {
      +      "description": "O específico da fonte: o que revisa, quando, por quê",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "description": "current = versão vigente, a fonte pode revisá-la; provisional = preliminar, incompleta ou sujeita a mudança (não compare como se fosse fechada); final = não muda mais, declarado pela fonte",
      +      "enum": [
      +        "current",
      +        "provisional",
      +        "final"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "note"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedOutput schema / properties / provenance / properties / field_sources
      Added value: +{
      +  "description": "Proveniência por sub-fonte (contrato v1.2): presente só quando a resposta junta partes extraídas de origens ou em momentos distintos, uma entrada por grupo de campos; ausente quando a resposta vem de uma única extração",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "data_vintage": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "dataset_id": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "fields": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "retrieved_at": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "served_from_cache": {
      +        "type": [
      +          "boolean",
      +          "null"
      +        ]
      +      },
      +      "source_url": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "fields",
      +      "source_url",
      +      "dataset_id",
      +      "data_vintage",
      +      "retrieved_at"
      +    ],
      +    "type": "object"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
  3. Changed3 schema fields changed
    • changedOutput schema / properties / provenance / description
      Previous value: -"Bloco de proveniência (contrato v1.0): fonte, URL, período, extração e licença"New value: +"Bloco de proveniência (contrato v1.1): fonte, URL, período, extração, diagnóstico de origem e licença"
    • addedOutput schema / properties / provenance / properties / retrieval
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "anomalies": {
      +          "description": "Anomalias superadas até o sucesso, somadas por classe, em ordem fixa; [] se nenhuma",
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "count": {
      +                "description": "Ocorrências desta classe na chamada",
      +                "maximum": 9007199254740991,
      +                "minimum": 1,
      +                "type": "integer"
      +              },
      +              "kind": {
      +                "description": "Classe da anomalia (vocabulário fechado do contrato)",
      +                "enum": [
      +                  "timeout",
      +                  "network",
      +                  "http_4xx",
      +                  "http_5xx",
      +                  "rate_limited",
      +                  "malformed_body"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "kind",
      +              "count"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "attempts": {
      +          "description": "Tentativas somadas, incluindo as repetidas (>= requests)",
      +          "maximum": 9007199254740991,
      +          "minimum": 1,
      +          "type": "integer"
      +        },
      +        "requests": {
      +          "description": "Idas distintas à origem que compõem esta resposta (fatias, páginas)",
      +          "maximum": 9007199254740991,
      +          "minimum": 1,
      +          "type": "integer"
      +        },
      +        "unstable": {
      +          "description": "true se houve repetição (attempts > requests) ou alguma anomalia",
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "requests",
      +        "attempts",
      +        "anomalies",
      +        "unstable"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Diagnóstico de origem desta chamada (contrato v1.1): idas à API do IBGE, tentativas somadas e anomalias contornadas; unstable=true quando houve anomalia. null quando nada foi medido (resposta servida só do cache)"
      +}
    • changedOutput schema / properties / provenance / required
      Previous value: -[
      -  "source",
      -  "source_url",
      -  "data_vintage",
      -  "retrieved_at",
      -  "citation",
      -  "license"
      -]New value: +[
      +  "source",
      +  "source_url",
      +  "data_vintage",
      +  "retrieved_at",
      +  "retrieval",
      +  "citation",
      +  "license"
      +]
  4. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  5. Changed19 schema fields changed
    • changedInput schema / properties / codigo / description
      Previous value: -"Código específico do tema (ex: código do bioma, da região metropolitana)"New value: +"Filtra uma feição do recorte. Só os recortes que têm código próprio aceitam: biomas (cd_bioma, ex. \"1\") e os dois de municípios, costeiro e fronteira (código IBGE de 7 dígitos). Nos demais a chamada é recusada com a lista do que aceita."
    • removedInput schema / properties / formato
      Removed value: -{
      -  "default": "geojson",
      -  "description": "Formato de saída",
      -  "enum": [
      -    "geojson",
      -    "topojson",
      -    "svg"
      -  ],
      -  "type": "string"
      -}
    • addedInput schema / properties / limite
      Added value: +{
      +  "default": 50,
      +  "description": "Quantas feições trazer (padrão 50, máx. 600). O total do recorte vem sempre, mesmo quando o limite corta a lista.",
      +  "maximum": 600,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • removedInput schema / properties / qualidade
      Removed value: -{
      -  "default": "4",
      -  "description": "Qualidade do traçado: 1=mínima, 4=máxima",
      -  "enum": [
      -    "1",
      -    "2",
      -    "3",
      -    "4"
      -  ],
      -  "type": "string"
      -}
    • removedInput schema / properties / resolucao
      Removed value: -{
      -  "default": "0",
      -  "description": "0 = Apenas contorno, 5 = Com municípios",
      -  "enum": [
      -    "0",
      -    "5"
      -  ],
      -  "type": "string"
      -}
    • changedInput schema / properties / tema / description
      Previous value: -"Tema da malha:\n- biomas: Biomas brasileiros (Amazônia, Cerrado, etc.)\n- amazonia_legal: Área da Amazônia Legal\n- semiarido: Região do semiárido\n- costeiro: Zona costeira\n- fronteira: Faixa de fronteira\n- metropolitana: Regiões metropolitanas\n- ride: Regiões Integradas de Desenvolvimento\n- listar: Lista temas disponíveis"New value: +"Recorte temático do território:\n- biomas: os seis biomas continentais\n- amazonia_legal: limite da Amazônia Legal\n- semiarido: área do semiárido\n- costeiro: municípios da zona costeira\n- fronteira: municípios da faixa de fronteira\n- metropolitana: regiões metropolitanas\n- ride: Regiões Integradas de Desenvolvimento\n- listar: lista os recortes disponíveis, sem consultar a fonte"
    • addedOutput schema / properties / camada
      Added value: +{
      +  "description": "Camada WFS do IBGE Geosserviços consultada",
      +  "type": "string"
      +}
    • changedOutput schema / properties / codigo / description
      Previous value: -"Código específico do tema, quando informado"New value: +"Código usado como filtro, quando informado"
    • addedOutput schema / properties / feicoes
      Added value: +{
      +  "description": "Total de feições do recorte na fonte",
      +  "type": "number"
      +}
    • addedOutput schema / properties / feicoes_retornadas
      Added value: +{
      +  "description": "Quantas vieram nesta resposta",
      +  "type": "number"
      +}
    • removedOutput schema / properties / formato
      Removed value: -{
      -  "description": "Formato de saída (geojson, topojson, svg)",
      -  "type": "string"
      -}
    • addedOutput schema / properties / registros
      Added value: +{
      +  "description": "Atributos de cada feição (sem geometria)",
      +  "items": {
      +    "additionalProperties": {},
      +    "propertyNames": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • removedOutput schema / properties / resolucao
      Removed value: -{
      -  "description": "Resolução da malha (0 = contorno, 5 = com municípios)",
      -  "type": "string"
      -}
    • changedOutput schema / properties / tema / description
      Previous value: -"Tema da malha solicitada (ou 'listar')"New value: +"Recorte solicitado (ou 'listar')"
    • changedOutput schema / properties / temas / description
      Previous value: -"Lista de temas disponíveis (somente no modo 'listar')"New value: +"Lista de recortes disponíveis (somente no modo 'listar')"
    • changedOutput schema / properties / temas / items / properties / descricao / description
      Previous value: -"Descrição do tema"New value: +"Descrição do recorte"
    • changedOutput schema / properties / temas / items / properties / nome / description
      Previous value: -"Nome do tema"New value: +"Nome do recorte"
    • changedOutput schema / properties / temas / items / properties / tema / description
      Previous value: -"Identificador do tema"New value: +"Identificador do recorte"
    • addedOutput schema / properties / url_geometria
      Added value: +{
      +  "description": "URL canônica do WFS que devolve a malha COM geometria, em GeoJSON",
      +  "type": "string"
      +}
  6. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/openWorld/non-destructive, and the description adds genuinely new behavioral facts: geometry is deliberately excluded because a single biome polygon exceeds 9 MB, a canonical WFS URL is returned instead, the call is a live GET against IBGE Geosserviços WFS (a different service from the Malhas API), and the response shape is Markdown plus typed structuredContent. That is substantive context beyond the annotation set.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well front-loaded and sectioned (purpose, recorte list, filtering, exclusions, behavior), but the bulleted recorte list largely duplicates the enum descriptions in the schema, adding length without new meaning. Efficient overall, with one redundant block.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter, enum-driven tool with an output schema and full annotation coverage, the description closes every remaining gap an agent would face: which recortes exist, which accept `codigo`, that geometry is intentionally absent and where to fetch it, and the upstream service. No material information is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, and the description clears that bar by explaining that `codigo` is only honored by biomas/costeiro/fronteira and that biome codes originate from the source rather than a fixed table. It adds a little over the schema, though much of the recorte enumeration restates the enum descriptions already present in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Lists what a THEMATIC territorial recorte of Brazil contains') and enumerates exactly what comes back: feature count, codes, names, and a geometry download URL. It also explicitly differentiates itself from the sibling ibge_malhas ('Administrative meshes WITH geometry'), so an agent can route correctly without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states when to use an alternative ('Use a different tool when: Administrative meshes WITH geometry → ibge_malhas') and gives the condition that selects each recorte, including a dedicated 'listar' mode to inspect the catalogue without hitting the source. It also spells out when `codigo` applies versus when the call is refused, leaving nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.