Skip to main content
Glama

Malhas temáticas

ibge_malhas_tema
Read-onlyIdempotent

List thematic territorial divisions of Brazil (biomes, Legal Amazon, semi-arid, etc.) with codes, names, and a WFS URL for geometry download.

Instructions

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 (contrato v1.0): fonte, URL, período, extração 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. Changed20 schema fields changedv5.0.0
    • addedInput schema / additionalProperties
      Added value: +false
    • 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"
      +}
  2. Changed4 schema fields changedv4.0.0
    • removedOutput schema / properties / provenance / properties / data_vintage / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / provenance / properties / data_vintage / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / provenance / properties / license / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / provenance / properties / license / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  3. Changed6 schema fields changedv3.3.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / properties / attribution
      Added value: +{
      +  "description": "URLs canônicas das fontes desta resposta (lista de atribuição)",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / provenance
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Bloco de proveniência (contrato v1.0): fonte, URL, período, extração e licença",
      +  "properties": {
      +    "citation": {
      +      "description": "Citação pronta para uso",
      +      "type": "string"
      +    },
      +    "data_vintage": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Período de referência do dado segundo a fonte; null se a fonte não expõe"
      +    },
      +    "license": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Regime legal do dado"
      +    },
      +    "retrieved_at": {
      +      "description": "Instante real da extração no upstream (ISO-8601, horário de Brasília)",
      +      "type": "string"
      +    },
      +    "source": {
      +      "description": "Fonte oficial do dado (API do IBGE consultada)",
      +      "type": "string"
      +    },
      +    "source_url": {
      +      "description": "URL canônica que reproduz a consulta",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "source",
      +    "source_url",
      +    "data_vintage",
      +    "retrieved_at",
      +    "citation",
      +    "license"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "tema"
      -]New value: +[
      +  "tema",
      +  "provenance",
      +  "attribution"
      +]
  4. Changed1 schema field changedv3.0.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "codigo": {
      +      "description": "Código específico do tema, quando informado",
      +      "type": "string"
      +    },
      +    "formato": {
      +      "description": "Formato de saída (geojson, topojson, svg)",
      +      "type": "string"
      +    },
      +    "resolucao": {
      +      "description": "Resolução da malha (0 = contorno, 5 = com municípios)",
      +      "type": "string"
      +    },
      +    "tema": {
      +      "description": "Tema da malha solicitada (ou 'listar')",
      +      "type": "string"
      +    },
      +    "temas": {
      +      "description": "Lista de temas disponíveis (somente no modo 'listar')",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "descricao": {
      +            "description": "Descrição do tema",
      +            "type": "string"
      +          },
      +          "nome": {
      +            "description": "Nome do tema",
      +            "type": "string"
      +          },
      +          "tema": {
      +            "description": "Identificador do tema",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "tema",
      +          "nome",
      +          "descricao"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "tema"
      +  ],
      +  "type": "object"
      +}
  5. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, open-world, non-destructive. The description adds substantial value beyond them: the design decision that geometry is deliberately excluded (with a concrete size at ~9 MB per biome polygon) and that a canonical WFS URL is returned instead, plus the detail that this hits the IBGE Geosserviços WFS rather than the Malhas API. It stops short of discussing rate limits or error behavior, so it is not a 5.

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?

The description is front-loaded with the core capability, then uses scannable sub-sections for recortes, filtering, and alternatives. It is on the longer side, but every section earns its place; the geometry rationale could be tightened slightly but is justified by the size figure.

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?

Given an output schema exists and annotations carry the safety profile, the description completes the picture: it explains what the response contains, what is intentionally omitted (geometry), how to obtain geometry (WFS URL), which recortes accept codigo, and which sibling to use for administrative meshes. Nothing material to correct invocation is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents tema, codigo, limite and their enums/defaults/maxima. The description reinforces codigo semantics and explains the biome-code provenance ('biome codes come from the source, not from a fixed table'), but this is largely redundant with the schema – baseline 3 is appropriate.

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 opens with a specific verb and resource: 'Lists what a THEMATIC territorial recorte of Brazil contains: how many features, with which codes and names, and the URL to download its geometry.' It also names the sibling it is not ('Administrative meshes WITH geometry → ibge_malhas'), so an agent can distinguish it from the similarly named ibge_malhas immediately.

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?

The 'Use a different tool when' block explicitly routes administrative mesh requests to ibge_malhas, and the description explains the codigo filtering acceptance per recorte as well as when to call without codigo ('Ask without codigo to see what exists'). This is explicit when-to-use and when-not-to-use guidance.

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