Skip to main content
Glama

Comparação entre localidades

ibge_comparar
Read-onlyIdempotent

Compare up to 10 Brazilian municipalities or states on IBGE indicators like population, GDP, or area. Get statistics and ranked output.

Instructions

Compares data between localities (municipalities or states).

Available indicators:

  • populacao: Current population estimate

  • populacao_censo: Census 2022 population

  • pib: GDP per capita

  • area: Territorial area (km²)

  • densidade: Population density (inhab/km²)

  • alfabetizacao: Literacy rate

  • domicilios: Number of households

Features:

  • Compare up to 10 localities at once

  • Calculate statistics (max, min, average, variation)

  • Generate ranked output

  • Accept municipality codes (7 digits) or state codes (2 digits)

Examples:

  • Compare capitals: localidades="3550308,3304557,4106902", indicador="populacao"

  • Compare states: localidades="35,33,41", indicador="pib"

  • Area ranking: localidades="3550308,3304557", formato="ranking"

  • List indicators: indicador="listar"

Use a different tool when:

  • You want a time series or one known indicator rather than comparing a fixed set of localities → ibge_indicadores

  • You need census themes or historical census data → ibge_censo

  • You know the exact SIDRA table and need arbitrary dimensions → ibge_sidra

Use this tool ONLY to rank/compare 2–10 localities on one indicator. For a single locality, use ibge_cidades (municipal panel), ibge_censo, or ibge_sidra.

Behavior: read-only and idempotent — a live GET against the public IBGE APIs (SIDRA and Localidades). Returns Markdown plus a typed structuredContent payload.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatoNoFormato de saída: tabela, json ou ranking (ordenado)tabela
indicadorNoIndicador para comparação: - populacao: Estimativa populacional atual - populacao_censo: População do Censo 2022 - pib: PIB a preços correntes (Mil Reais) - area: Área territorial (km²) - densidade: Densidade demográfica (hab/km²) - alfabetizacao: Taxa de alfabetização - domicilios: Número de domicílios - listar: Lista indicadores disponíveispopulacao
localidadesYesCódigos IBGE das localidades separados por vírgula (ex: "3550308,3304557,4106902"). Use 7 dígitos para municípios, 2 dígitos para UFs.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nomeNoNome do indicador
tabelaNoTabela SIDRA de origem
formatoNoFormato solicitado
indicadorNoIndicador comparado
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)
localidadesYesLocalidades comparadas, com o valor do indicador
estatisticasNoEstatísticas agregadas (quando há ao menos 2 valores positivos)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive. The description adds behavioral context beyond them by disclosing it performs a live GET against the public IBGE APIs (SIDRA and Localidades) and returns Markdown plus a typed structuredContent payload. It does not cover error/rate-limit behavior, but with safety fully annotated this is solid added value.

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?

Purpose is front-loaded, then useful sections (indicators, features, examples, exclusions, behavior) in a scannable structure. It runs long and duplicates the schema's indicator definitions, but each sentence is on-topic and aids selection.

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?

With annotations covering the safety profile, 100% schema coverage, an output schema handling return values, and explicit sibling routing, the definition supplies everything an agent needs to select and invoke it correctly. No material gap remains.

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, but the description adds a real constraint absent from the schema ('Compare up to 10 localities at once') and concrete code-format examples (7-digit municipalities, 2-digit states) that clarify how to populate 'localidades'. The indicator list largely duplicates the schema enum.

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?

States a specific verb+resource ('Compares data between localities (municipalities or states)') and immediately names the scope of the operation. It differentiates itself from siblings by explicitly stating it compares a fixed set of localities rather than producing time series or single-locality panels.

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?

Provides an explicit 'Use a different tool when:' block naming three alternatives (ibge_indicadores, ibge_censo, ibge_sidra) with the conditions that select each, plus a 'use ONLY to rank/compare 2–10 localities' constraint and single-locality fallbacks (ibge_cidades, ibge_censo, ibge_sidra). Nothing is left to inference.

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