ibge-microdata-mcp
The ibge-microdata-mcp server is a local-first MCP server for discovering, downloading, converting, querying, and analyzing official Brazilian IBGE public microdata (e.g., PNAD Contínua, POF) using DuckDB and Parquet — no hosted database required.
Survey Discovery & Navigation
List supported survey families, browse/crawl
ftp.ibge.gov.brdirectories, list official download files, and check connectivity to IBGE endpoints
File Inspection & Downloading
Inspect file metadata (size, type, ETag) before downloading; download files to a local cache with automatic cache-hit detection, SHA-256 integrity checks, and HTTPS/HTTP fallback
Cache Management
List, paginate, and selectively clean up cached files by age, size, or URL prefix, with mandatory dry-run preview
Archive & Layout Handling
List ZIP entries and extract individual files without unpacking entire archives; parse official IBGE SAS/TXT fixed-width layouts (variable names, positions, widths, types, descriptions)
Metadata Inventory & Search
Inventory metadata from documentation ZIPs (SAS/TXT layouts, Excel dictionaries, plain-text tables); search variables by name or description; export Base dos Dados–style architecture CSV (variables) and dictionary CSV (value labels)
Data Conversion to Parquet
Convert fixed-width TXT files (from disk or inside ZIPs) to Parquet using official layouts, with optional column selection and row limits; POF-specific conversion with implied decimal scaling
Querying & Analysis
Run read-only DuckDB SQL (SELECT/WITH) over single or multiple named Parquet views; describe/profile views (schema, row counts, nulls, numeric ranges, frequent values, sample rows); compute weighted totals, means, group shares, and top-bracket shares (e.g., top 1%) with proportional tie-breaking
Harmonization Recipes
Validate and apply versioned JSON recipes that declare required views, SQL transformations, and validation checks to produce derived Parquet output
Survey-Specific Helpers
POF: parse Excel dictionaries, map record sheets to ZIP entries
PNAD Contínua: analyze predefined variable sets from TXT/ZIP files; R-backed downloads via
PNADcIBGEordatazoom.social; check local R environment status
Enables querying local IBGE microdata Parquet files using DuckDB SQL, allowing for efficient read-only queries and weighted distribution calculations.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ibge-microdata-mcplist files for the POF survey"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
IBGE Microdata MCP Server
Local-first MCP server for discovering, downloading, unpacking, converting, querying, and analyzing official public IBGE microdata.
This project does not host IBGE datasets. It uses IBGE download servers as the source of truth, downloads only files explicitly requested by the user, mirrors them into a local cache, and runs analysis on local files.
IBGE's raw public download host is ftp.ibge.gov.br. The server accepts both https:// and http:// URLs for that host. It tries to keep official HTTPS URLs where possible, but can fall back to official HTTP for public files when HTTPS is slow or unavailable. Tool output reports the resolved URL, transport used, and SHA-256 hash after download.
Why Local-First
IBGE microdata files are public, but many are large enough that an MCP server should not return them directly in chat responses. The practical workflow is:
discover official files -> inspect size -> download selected archive -> inspect/extract entries -> convert selected variables to Parquet -> query with DuckDBIn plain terms:
DuckDB is a local analytical SQL engine. It can query large local files without running a database server.
Parquet is a compressed columnar file format. Convert fixed-width TXT microdata once, then query only the columns you need.
Related MCP server: recife-open-data-mcp
Core Generic Tools
Tool | Purpose |
| List survey families with convenience support. |
| Check whether this machine can reach IBGE download/API endpoints over HTTPS and HTTP. |
| List known public archive files for supported survey families. |
| List any official |
| Bounded crawl of official IBGE directories to find microdata, data, documentation, and layout files. |
| Bounded crawl focused on likely dictionary, layout, input, codebook, and documentation files. |
| Read file size, type, update timestamp, and validators with HTTP HEAD. |
| Download or reuse one official IBGE file in a local cache. |
| List files already downloaded into a local cache with URLs, paths, sizes, and timestamps. |
| Preview or delete selected cached files using safe filters. |
| List files inside a local ZIP archive without extracting all of it. |
| Extract one selected ZIP entry to a local path. |
| Parse a local IBGE fixed-width input layout and search variables. |
| Parse local dictionaries/layouts or documentation ZIPs into records, variables, positions, types, and value labels. |
| Search local official metadata for variable names, descriptions, and parsed value labels/categories. |
| Export parsed official metadata to a local Base dos Dados-style architecture CSV. |
| Export parsed official value labels/categories to a local Base dos Dados-style |
| Convert a fixed-width TXT file plus official layout into a local Parquet file. |
| Convert one fixed-width TXT entry inside a ZIP directly into local Parquet. |
| Run bounded read-only DuckDB SQL over local Parquet files exposed as |
| Run bounded read-only DuckDB SQL over multiple named Parquet views for joins. |
| Calculate weighted totals, means, group shares, and top-bracket shares over local Parquet views. |
| Inspect schemas, row counts, and sample rows for named Parquet views. |
| Profile local Parquet views with row counts, null counts, numeric ranges, frequent values, and samples. |
| Validate a versioned JSON harmonization recipe without writing output. |
| Apply a versioned JSON harmonization recipe and write a derived Parquet file. |
The generic path is discovery, caching, official metadata inspection/search, Parquet conversion, profiling, and DuckDB querying. These tools are the main public surface of the server.
Optional Survey-Specific Helpers
These helpers are layered on top of the same local-first workflow. They are useful shortcuts for known IBGE formats, but they are not required for the generic workflow.
Tool | Purpose |
| Parse a POF Excel dictionary and map record sheets to data ZIP entries. |
| Convert one POF record from a Dados ZIP to Parquet using the POF dictionary. |
| PNAD Contínua convenience summary over an extracted fixed-width TXT file. |
| PNAD Contínua convenience summary directly over a TXT entry inside a ZIP. |
| Check local |
| Use |
| Use |
Prerequisites
This MCP is a local tool. Users are expected to have:
Node.js 18.20 or newer.
pnpm.
R with
Rscriptavailable onPATH.
R is included as a project prerequisite because PNAD Contínua and Data Zoom workflows are best supported by the existing Brazilian R ecosystem. The MCP server itself still runs as a Node/TypeScript process and returns MCP-friendly JSON, Markdown, and local file paths.
Install
Install system runtimes.
On macOS with Homebrew:
brew install node r
npm install -g pnpm@11.7.0On Windows with winget:
winget install OpenJS.NodeJS
winget install RProject.R
npm install -g pnpm@11.7.0On Ubuntu/Debian:
sudo apt update
sudo apt install -y nodejs npm r-base
sudo npm install -g pnpm@11.7.0Linux package managers sometimes ship older Node.js versions. If node --version is below 18.20, install a newer Node.js release from NodeSource, nvm, or the official Node.js installer.
You can also install the same tools from their official installers:
Check that all three are available:
node --version
pnpm --version
Rscript --versionClone the GitHub repository:
git clone https://github.com/emmanueltsallis/ibge-microdata-mcp.git
cd ibge-microdata-mcpInstall Node dependencies and build the local MCP server:
pnpm install
pnpm run buildInstall the baseline R packages used by the R-backed IBGE workflows:
Rscript -e 'install.packages(c("PNADcIBGE", "survey", "jsonlite", "arrow"), repos = "https://cloud.r-project.org")'
Rscript -e 'install.packages("datazoom.social", repos = c("https://datazoompuc.r-universe.dev", "https://cloud.r-project.org"))'Run
node dist/index.jsGeneric MCP Client Setup
Any MCP client that supports stdio can run this server. After cloning, installing dependencies, and running pnpm run build, configure your client to start the built Node entrypoint.
Use an absolute path to dist/index.js in client configuration. Most clients use the same basic shape:
{
"mcpServers": {
"ibge-microdata": {
"command": "node",
"args": ["/absolute/path/to/ibge-microdata-mcp/dist/index.js"]
}
}
}If your client uses TOML or another config format, the same idea applies: command is the Node executable, and args contains the absolute path to this server's built dist/index.js file.
Most MCP clients start configured servers when the app or session starts, so restart or reload the client after changing MCP configuration. If the tools do not appear immediately, restart the client first before debugging the server.
MCP uses stdout for protocol messages. This server writes startup and fatal logs to stderr, which keeps stdio protocol traffic clean for clients.
You can smoke-test the server independently of any specific client:
node --input-type=module - <<'NODE'
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
const transport = new StdioClientTransport({
command: 'node',
args: ['/absolute/path/to/ibge-microdata-mcp/dist/index.js'],
});
const client = new Client({ name: 'ibge-microdata-smoke', version: '0.0.0' });
await client.connect(transport);
const tools = await client.listTools();
console.log(tools.tools.map((tool) => tool.name).sort().join('\n'));
await client.close();
NODEThe smoke test should list tools such as ibge_microdata_list_surveys, ibge_microdata_metadata_inventory, and ibge_microdata_fixed_width_zip_to_parquet.
For a shorter generic walkthrough, see examples/generic-workflow.md. For a starter harmonization recipe, see examples/harmonization-recipe.json. For external harmonization sources that can inform recipes, see docs/harmonization-sources.md.
R-Backed PNADc Workflow
Use the R status tool first:
ibge_microdata_r_status({})Download PNAD Contínua through PNADcIBGE and write a Parquet file that the MCP can query with DuckDB:
ibge_microdata_pnadc_r_download({
"year": 2024,
"quarter": 4,
"vars": ["UF", "V1028"],
"outputPath": "/Users/you/.cache/ibge-microdata-mcp/converted/pnadc_2024q4.parquet"
})Use datazoom.social when you want Data Zoom's PNAD Contínua processing or panel identifiers:
ibge_microdata_datazoom_pnadc_load({
"outputDir": "/Users/you/.cache/ibge-microdata-mcp/datazoom/pnadc",
"years": [2024],
"quarters": [1, 2, 3, 4],
"panel": "basic",
"outputFormat": "parquet"
})Generic Workflow
Find public files from a known survey family or an official directory:
ibge_microdata_list_surveys({})ibge_microdata_connectivity_check({})ibge_microdata_list_files({
"survey": "pof"
})ibge_microdata_discover({
"rootUrl": "https://ftp.ibge.gov.br/",
"maxDepth": 3,
"maxDirectories": 50
})ibge_microdata_discover_metadata({
"rootUrl": "https://ftp.ibge.gov.br/",
"maxDepth": 4,
"maxDirectories": 100
})Inspect file metadata before downloading:
ibge_microdata_file_info({
"url": "https://ftp.ibge.gov.br/path/to/public/archive.zip"
})Download to a local cache:
ibge_microdata_download_file({
"url": "https://ftp.ibge.gov.br/path/to/public/archive.zip",
"cacheRoot": "/Users/you/.cache/ibge-microdata-mcp"
})The downloader mirrors the official ftp.ibge.gov.br path under cacheRoot. On repeated calls, it checks IBGE content-length metadata first and returns a cache hit when the existing local file has the expected byte size.
If HTTPS to ftp.ibge.gov.br times out, the downloader may retry the same public file over http://ftp.ibge.gov.br. This does not send credentials or private data; it only downloads public IBGE files. The response reports transport, usedFallback, and sha256 so the transfer remains auditable in headless MCP use.
List the cache later if you need to rediscover local paths:
ibge_microdata_list_cache({
"cacheRoot": "/Users/you/.cache/ibge-microdata-mcp",
"limit": 50,
"offset": 0
})Preview cache cleanup when storage grows:
ibge_microdata_cleanup_cache({
"cacheRoot": "/Users/you/.cache/ibge-microdata-mcp",
"dryRun": true,
"olderThanDays": 30,
"minBytes": 100000000
})The cleanup tool defaults to dryRun: true, requires at least one filter, and only considers files under cacheRoot/ftp.ibge.gov.br. Set dryRun: false only after reviewing the preview.
Inspect archive contents:
ibge_microdata_zip_entries({
"zipPath": "/Users/you/.cache/ibge-microdata-mcp/ftp.ibge.gov.br/path/to/public/archive.zip"
})Inventory official metadata and search variables:
ibge_microdata_metadata_inventory({
"zipPaths": ["/Users/you/.cache/ibge-microdata-mcp/ftp.ibge.gov.br/path/to/public/documentation.zip"],
"search": "weight",
"variableLimit": 50
})ibge_microdata_search_variables({
"zipPaths": ["/Users/you/.cache/ibge-microdata-mcp/ftp.ibge.gov.br/path/to/public/documentation.zip"],
"query": "rendimento",
"limit": 50
})The metadata tools parse official SAS/TXT input layouts, POF-style Excel dictionaries, generic Excel dictionary tables, and plain-text dictionary tables with recognizable position/width/variable columns. When available, they return value labels/categories such as state codes or response categories. If a file cannot be parsed, the inventory reports which parser attempts were tried.
Export Base dos Dados-style local documentation CSVs when you want portable metadata files:
ibge_microdata_export_architecture_csv({
"zipPaths": ["/Users/you/.cache/ibge-microdata-mcp/ftp.ibge.gov.br/path/to/public/documentation.zip"],
"outputPath": "/Users/you/.cache/ibge-microdata-mcp/extra/architecture/variables.csv"
})ibge_microdata_export_dictionary_csv({
"zipPaths": ["/Users/you/.cache/ibge-microdata-mcp/ftp.ibge.gov.br/path/to/public/documentation.zip"],
"outputPath": "/Users/you/.cache/ibge-microdata-mcp/extra/dicionario.csv"
})The architecture export writes one row per parsed variable. The dictionary export writes one row per parsed category/code label. These are local documentation artifacts inspired by Base dos Dados workflows; they do not upload anything to BigQuery and do not require Base dos Dados credentials.
Inspect a fixed-width layout directly when you already have the layout file:
ibge_microdata_inspect_layout({
"layoutPath": "/path/to/official-input-layout.txt",
"search": "weight",
"limit": 50
})Convert selected variables to Parquet:
ibge_microdata_fixed_width_zip_to_parquet({
"layoutPath": "/path/to/official-input-layout.txt",
"zipPath": "/Users/you/.cache/ibge-microdata-mcp/ftp.ibge.gov.br/path/to/public/archive.zip",
"entryName": "MICRODATA.txt",
"outputPath": "/Users/you/.cache/ibge-microdata-mcp/converted/sample.parquet",
"selectedVariables": ["record_id", "region", "sample_weight", "target_value"]
})Profile the Parquet file before writing custom SQL:
ibge_microdata_profile_parquet_views({
"views": [
{
"name": "microdata",
"parquetPaths": ["/Users/you/.cache/ibge-microdata-mcp/converted/sample.parquet"]
}
],
"columns": ["region", "sample_weight", "target_value"],
"topK": 10,
"sampleRows": 3
})If columns is omitted, the tool profiles the first 25 columns by default. This keeps wide microdata files manageable while still giving enough information to choose variables and write queries.
Query the Parquet file with DuckDB:
ibge_microdata_query_parquet({
"parquetPaths": ["/Users/you/.cache/ibge-microdata-mcp/converted/sample.parquet"],
"sql": "select region, sum(sample_weight * target_value) / sum(sample_weight) as weighted_mean from microdata group by region order by region",
"maxRows": 100
})The query tools accept only SELECT or WITH queries, reject semicolons and write-oriented keywords, and cap returned rows.
Harmonization Recipes
Recipes are optional JSON files that make harmonization assumptions explicit and reusable. The MCP does not ship one universal harmonization standard; instead, a recipe declares the required input views/columns, an output SELECT transformation, optional source references, and validation checks.
ibge_microdata_validate_recipe({
"recipePath": "/path/to/harmonization-recipe.json",
"views": [
{
"name": "microdata",
"parquetPaths": ["/Users/you/.cache/ibge-microdata-mcp/converted/sample.parquet"]
}
],
"sampleRows": 5
})If the validation output says requirements and validations passed, write the harmonized Parquet file:
ibge_microdata_apply_recipe({
"recipePath": "/path/to/harmonization-recipe.json",
"views": [
{
"name": "microdata",
"parquetPaths": ["/Users/you/.cache/ibge-microdata-mcp/converted/sample.parquet"]
}
],
"outputPath": "/Users/you/.cache/ibge-microdata-mcp/converted/harmonized.parquet",
"sampleRows": 5
})Recipe SQL accepts only SELECT or WITH statements. The validation tool reports missing input columns, output schema, sample output rows, and validation results without writing a file. The apply tool writes the harmonized output only when requirements and validations pass.
Weighted Distributions
Use ibge_microdata_weighted_distribution when a Parquet file contains one row per analytical unit, a numeric value column, and a numeric survey/sample weight column:
ibge_microdata_weighted_distribution({
"views": [
{
"name": "microdata",
"parquetPaths": ["/Users/you/.cache/ibge-microdata-mcp/converted/sample.parquet"]
}
],
"unitSql": "select region, target_value as value, sample_weight as weight from microdata",
"valueColumn": "value",
"weightColumn": "weight",
"groupColumn": "region",
"topPercents": [0.01, 0.05, 0.1]
})The tool ranks units by the value column, applies weights, reports total weight, total value, weighted mean, optional group shares, and top-bracket shares. If a top bracket cuts through tied values at the cutoff, the tied bucket is allocated proportionally.
Relational Records
Some surveys publish multiple record files. Convert each record to Parquet, inspect the resulting schemas, then join named views:
ibge_microdata_describe_parquet_views({
"views": [
{
"name": "record_a",
"parquetPaths": ["/Users/you/.cache/ibge-microdata-mcp/converted/record_a.parquet"]
},
{
"name": "record_b",
"parquetPaths": ["/Users/you/.cache/ibge-microdata-mcp/converted/record_b.parquet"]
}
],
"includeRowCounts": true,
"sampleRows": 3
})ibge_microdata_query_parquet_views({
"views": [
{
"name": "record_a",
"parquetPaths": ["/Users/you/.cache/ibge-microdata-mcp/converted/record_a.parquet"]
},
{
"name": "record_b",
"parquetPaths": ["/Users/you/.cache/ibge-microdata-mcp/converted/record_b.parquet"]
}
],
"sql": "select a.region, count(*) as rows from record_a a join record_b b using (record_id) group by a.region order by a.region",
"maxRows": 100
})POF Dictionaries
POF editions use Excel dictionary workbooks. Use the manifest tool to map dictionary sheets to TXT entries before converting records:
ibge_microdata_pof_manifest({
"dictionaryPath": "/path/to/dictionary.xls",
"dataZipPath": "/Users/you/.cache/ibge-microdata-mcp/ftp.ibge.gov.br/path/to/Dados.zip",
"search": "weight",
"variableLimit": 20
})ibge_microdata_pof_zip_record_to_parquet({
"dictionaryPath": "/path/to/dictionary.xls",
"zipPath": "/Users/you/.cache/ibge-microdata-mcp/ftp.ibge.gov.br/path/to/Dados.zip",
"recordName": "Domicílio",
"outputPath": "/Users/you/.cache/ibge-microdata-mcp/converted/pof_record.parquet",
"selectedVariables": ["UF", "ESTRATO_POF", "TIPO_SITUACAO_REG"]
})The POF converter applies implied decimal scaling from the dictionary and writes DuckDB-queryable Parquet files.
Tests
Offline unit tests:
pnpm testLive smoke tests against official IBGE endpoints:
RUN_IBGE_SMOKE=1 pnpm test -- tests/smoke.test.tsSmoke tests list official directories, read HEAD metadata, and download the smaller POF documentation ZIP to verify dictionary parsing. They do not download large microdata data ZIPs.
Local R setup smoke test:
RUN_R_SMOKE=1 pnpm test -- tests/r-smoke.test.tsThe R smoke test checks Rscript and baseline R package availability. It does not download PNAD microdata.
Current Limits
This is a local-first MCP server, not a hosted warehouse of all IBGE microdata.
Discovery is deliberately bounded; broad root crawls should use explicit
maxDepthandmaxDirectoriesvalues to avoid excessive requests.Generic fixed-width conversion, official metadata inventory/search, Parquet profiling/querying, weighted distribution summaries, and POF dictionary conversion are implemented.
Metadata parsing supports common IBGE SAS/TXT input layouts, POF-style Excel dictionaries, generic Excel dictionary tables, and generic TXT dictionary tables. PDF-only/prose-only codebooks and highly irregular historical layouts may still need parser adapters.
Additional survey-specific harmonized recipes can be added as optional layers without changing the generic workflow.
License
MIT. See LICENSE.
Available Tools
22 toolsibge_microdata_cleanup_cacheCleanup Local IBGE CacheADestructiveIdempotent
Preview or delete selected files from the local IBGE microdata cache.
The tool only considers files under cacheRoot/ftp.ibge.gov.br and requires at least one filter such as olderThanDays, minBytes, or urlPrefix. It defaults to dryRun=true, so use it first to preview what would be deleted. Set dryRun=false only after the user explicitly agrees to delete the matched cached files.
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | Preview matching files without deleting them. Defaults to true. | |
| minBytes | No | Only match cached files at least this many bytes large. | |
| cacheRoot | Yes | Local cache root previously used with ibge_microdata_download_file. | |
| urlPrefix | No | Only match cached files whose official source URL starts with this ftp.ibge.gov.br prefix. | |
| olderThanDays | No | Only match cached files modified at least this many days ago. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Adds context beyond annotations: scope limited to cacheRoot/ftp.ibge.gov.br, need for filters, dryRun default, and requirement for user consent before deletion. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, each essential: core purpose, scope/filters, and safe workflow. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Fully covers all critical aspects: what it does, cache scope, required filters, default behavior, and safe usage. No gaps for effective agent selection and invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but description adds value by highlighting the filter requirement and dryRun default, aiding correct usage beyond schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states 'Preview or delete selected files from the local IBGE microdata cache,' specifying verb and resource. Distinguishes from sibling tools like download and list.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly requires at least one filter (olderThanDays, minBytes, or urlPrefix) and outlines the safe workflow: preview with dryRun=true, then set dryRun=false only after user agreement.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_describe_parquet_viewsDescribe Named Local IBGE Parquet ViewsARead-onlyIdempotent
Inspect local Parquet files as named DuckDB views and return columns, DuckDB types, optional row counts, and optional sample rows.
Use this before writing join queries over POF or other relational microdata records so the agent can see actual column names and types.
| Name | Required | Description | Default |
|---|---|---|---|
| views | Yes | Named local Parquet views to inspect. | |
| sampleRows | No | Number of sample rows to return per view. Defaults to 0 and is capped at 100. | |
| includeRowCounts | No | Whether to count rows in each view. Defaults to false. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description is fully consistent with annotations (readOnlyHint, idempotentHint, destructiveHint=false) and adds behavioral details: optional row counts, sample rows capped at 100, and the non-destructive nature of inspection. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no wasted words. The first sentence states the core functionality, the second provides usage guidance. Front-loaded and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the main functionality and return information (columns, types, row counts, samples). Given the simple nature and good annotations, it is complete enough, though it could mention the DuckDB view persistence or relation to other tools more explicitly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 all parameters. The description adds little beyond schema (e.g., 'capped at 100' is in the max constraint), but clarifies the use case for 'views' parameter. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Inspect local Parquet files as named DuckDB views') and the resource (Parquet files as views). It distinguishes from siblings like 'ibge_microdata_profile_parquet_views' and 'ibge_microdata_query_parquet_views' by specifying it returns columns, types, and optional samples, and positions it as a preparatory step for join queries.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly advises using this tool 'before writing join queries' to see column names and types, providing clear context. It implies not to use it for running queries or profiling, but lacks explicit exclusions, earning a 4.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_discoverDiscover Official IBGE Microdata FilesARead-onlyIdempotent
Crawl official ftp.ibge.gov.br directories with strict limits to find public microdata directories, data ZIPs, and documentation/layout files.
Use this when a survey-specific convenience listing is not implemented yet. The tool only fetches directory pages; it does not download microdata archives.
| Name | Required | Description | Default |
|---|---|---|---|
| rootUrl | No | Official ftp.ibge.gov.br directory URL where discovery should start. Defaults to the IBGE FTP root. | |
| maxDepth | No | Maximum crawl depth from root. Defaults to 3 and is capped at 8. | |
| maxDirectories | No | Maximum number of directories to fetch. Defaults to 50 and is capped at 500. | |
| includeDocumentation | No | Whether to include documentation, dictionary, layout, and input files in matches. Defaults to true. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
All annotations (readOnlyHint, openWorldHint, idempotentHint, destructiveHint) are present and consistent with the description. The description adds context about strict limits, only fetching directory pages, and not downloading, which goes beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences that are front-loaded: first sentence states purpose and scope, second sentence gives usage guidance. No wasted words, every sentence is valuable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a discovery tool with no output schema, the description covers purpose, limits, and what it does not do. However, it does not describe the return format (e.g., directory listing structure), which might be inferred from context. Slight gap, but overall complete given annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description does not add additional meaning beyond the schema's parameter descriptions, which already detail defaults, caps, and behavior for each parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('crawl') and resource ('ftp.ibge.gov.br directories') and clearly differentiates from sibling tools by focusing on discovery of microdata, data ZIPs, and documentation files. It is not a tautology and distinguishes itself from survey-specific tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use ('when a survey-specific convenience listing is not implemented yet') and what it does not do ('does not download microdata archives'), providing clear when-not and limitations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_download_fileDownload IBGE Microdata FileARead-onlyIdempotent
Download or reuse a selected official IBGE microdata file in a local cache path.
This is explicit and local-first: the tool mirrors the ftp.ibge.gov.br URL under cacheRoot, checks official HEAD content-length metadata, and skips re-downloading when a cached file has the expected byte size. Use ibge_microdata_file_info first for large files so the user understands size before downloading.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Official ftp.ibge.gov.br file URL to download. | |
| cacheRoot | Yes | Local cache root where the official IBGE URL path will be mirrored. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, openWorldHint=true, idempotentHint=true, destructiveHint=false. The description adds specific caching behavior: mirrors URL under cacheRoot, checks HEAD content-length, skips re-download if size matches. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two paragraphs, first sentence front-loads the purpose, second adds caching details and usage guidance. No wasted words, efficient structure.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers caching mechanism, prerequisite usage of sibling tool, and local-first approach. However, lacks description of return value (likely local path), which is a minor gap given no output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for both url and cacheRoot. The description adds 'mirrors the ftp.ibge.gov.br URL under cacheRoot' which is already implied by schema descriptions. It does not provide new parameter-level semantics beyond caching behavior, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description starts with 'Download or reuse a selected official IBGE microdata file in a local cache path,' which clearly states the verb and resource. It distinguishes itself from siblings like ibge_microdata_file_info (info before download) and extraction tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly advises to use ibge_microdata_file_info first for large files so the user understands size before downloading. This provides clear when-to-use guidance and differentiates from sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_extract_zip_entryExtract ZIP EntryARead-onlyIdempotent
Extract one selected file from a local IBGE ZIP archive to a local path.
Use this to pull the PNAD fixed-width TXT file or the official input layout out of a downloaded ZIP without unpacking everything manually.
| Name | Required | Description | Default |
|---|---|---|---|
| zipPath | Yes | Local path to a ZIP archive downloaded from IBGE. | |
| entryName | Yes | Exact ZIP entry name to extract. | |
| outputPath | Yes | Local destination path for the extracted entry. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly, idempotent, nondestructive. Description adds that it extracts to a local path, which is consistent but does not disclose potential overwrite behavior or error handling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with verb and resource, no fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Adequate for a simple extraction tool with good annotations; does not describe return value or error conditions, but these are less critical given openWorldHint.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 100% coverage with descriptions; tool description only adds example entry names (PNAD TXT, input layout) but no new parameter semantics beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the verb 'extract' and resource 'local IBGE ZIP archive', and distinguishes from siblings like list_entries and batch conversion tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Second sentence provides explicit use case (PNAD fixed-width TXT file or input layout) and contrasts with manual unpacking, though it does not explicitly list alternative tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_file_infoInspect IBGE Microdata FileARead-onlyIdempotent
Fetch HTTP HEAD metadata for an official IBGE microdata file URL.
Use this before downloading a large file to check its size, content type, update timestamp, and ETag.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Official ftp.ibge.gov.br file URL to inspect with HTTP HEAD. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds value by specifying that it uses HTTP HEAD (non-downloading) and returns specific metadata (size, content type, timestamp, ETag), which is beyond the annotation information.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise: two sentences that directly state the purpose and usage guidance. No unnecessary words or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite lacking an output schema, the description fully explains what the tool returns (size, content type, timestamp, ETag). The single parameter is well-documented, and the usage context is clear. No additional detail is needed for this simple tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage for the sole parameter 'url' is 100%, and the description in the schema already explains it. The tool description does not add meaningful extra semantics beyond restating the schema description. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Fetch HTTP HEAD metadata') and the specific resource ('official IBGE microdata file URL'). It also distinguishes from sibling tools like ibge_microdata_download_file by explicitly recommending use before downloading.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says when to use it: 'before downloading a large file to check its size, content type, update timestamp, and ETag.' It does not explicitly mention when not to use or provide alternatives, but the context makes it clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_fixed_width_file_to_parquetConvert Fixed-Width IBGE File to ParquetAIdempotent
Convert a local fixed-width IBGE microdata TXT file into a local Parquet file using an official SAS/TXT input layout.
This is the generic optimization path for repeated analysis: use it for PNAD, POF, or other IBGE microdata families that publish fixed-width TXT files and input layouts. Select only needed variables to keep Parquet files small.
| Name | Required | Description | Default |
|---|---|---|---|
| dataPath | Yes | Local path to an extracted fixed-width microdata TXT file. | |
| rowLimit | No | Optional maximum number of non-empty rows to export, useful for smoke tests or previews. | |
| layoutPath | Yes | Local path to an official IBGE SAS/TXT input layout file. | |
| outputPath | Yes | Local destination path for the Parquet file to create. | |
| selectedVariables | No | Optional variable names to export. If omitted, all layout variables are exported. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare idempotentHint=true and destructiveHint=false. Description adds that this is an 'optimization path' but does not disclose any additional behavioral traits such as file overwrite behavior or performance characteristics.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences for the description and two for usage context. Every sentence conveys necessary information without redundancy. Front-loaded with the core action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the 100% schema coverage and no output schema, the description provides sufficient context: specifies the type of files (PNAD, POF), the optimization rationale, and variable selection advice. No gaps identified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so parameter descriptions already cover semantics. Description reinforces the ability to select variables but adds no additional meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states conversion from fixed-width IBGE microdata TXT to Parquet using an official layout. Differentiates from siblings like 'fixed_width_zip_to_parquet' by specifying local TXT files and mentioning specific surveys (PNAD, POF).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states the tool is for repeated analysis and recommends selecting only needed variables. Implies use for fixed-width files from IBGE microdata families. Does not explicitly mention when not to use or alternatives, but sibling tool name suggests zip-to-parquet alternative.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_fixed_width_zip_to_parquetConvert Fixed-Width IBGE ZIP Entry to ParquetAIdempotent
Convert one fixed-width TXT entry inside a local IBGE ZIP archive into a local Parquet file using an official SAS/TXT input layout.
This avoids extracting the full TXT first, writes a local columnar file, and is useful before running repeated DuckDB queries over selected PNAD, POF, or other IBGE variables.
| Name | Required | Description | Default |
|---|---|---|---|
| zipPath | Yes | Local path to a ZIP archive downloaded from IBGE. | |
| rowLimit | No | Optional maximum number of non-empty rows to export, useful for smoke tests or previews. | |
| entryName | Yes | Exact fixed-width TXT entry name inside the ZIP archive. | |
| layoutPath | Yes | Local path to an official IBGE SAS/TXT input layout file. | |
| outputPath | Yes | Local destination path for the Parquet file to create. | |
| selectedVariables | No | Optional variable names to export. If omitted, all layout variables are exported. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide readOnlyHint=false, idempotentHint=true, destructiveHint=false. The description adds that it writes a columnar file and avoids extraction, but does not disclose potential side effects like overwriting or error handling. The added value is moderate beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no wasted words. First sentence states the core transformation; second sentence adds benefits and use case. Optimal length for the content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (6 parameters, no output schema), the description covers the key points: direct conversion from zip, avoiding extraction, and suitability for DuckDB queries over IBGE surveys. It could explicitly contrast with similar sibling tools (e.g., fixed_width_file_to_parquet) to complete the decision context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, with all parameters described. The description does not add additional meaning beyond the schema's parameter descriptions, so baseline score is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the verb 'convert' and the specific resource: a fixed-width TXT entry inside a local IBGE ZIP archive to a Parquet file using an official SAS/TXT layout. This distinguishes it from siblings like ibge_microdata_fixed_width_file_to_parquet, which operates on an already extracted file.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Description explains that this tool avoids extracting the full TXT first and is useful before running repeated DuckDB queries, providing clear context. However, it does not explicitly state when not to use it or name alternative tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_inspect_layoutInspect IBGE Fixed-Width LayoutARead-onlyIdempotent
Parse a local official IBGE SAS/TXT input layout and return variable names, positions, widths, types, and descriptions.
Use this before converting fixed-width microdata to Parquet so you can choose selectedVariables without opening the full dictionary manually.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of variables to return. Defaults to 200 and is capped at 1000. | |
| search | No | Optional case-insensitive search over variable names and descriptions. | |
| layoutPath | Yes | Local path to an official IBGE SAS/TXT fixed-width input layout file. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare the tool as readOnly, idempotent, and non-destructive. The description adds that it returns structured variable metadata, which is useful beyond annotations. There is no contradiction between description and annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences: first sentence states the core functionality, second provides usage guidance. No unnecessary words or repetition. Highly efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description explains the return content (variable names, positions, etc.) even though there is no output schema. It covers the primary use case well. Could mention the limit and search parameters, but they are documented in the schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so parameters are fully documented in the schema. The description does not add additional semantics beyond what the schema provides. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Parse a local official IBGE SAS/TXT input layout and return variable names, positions, widths, types, and descriptions.' This is a specific verb-resource combination and distinguishes from sibling tools like ibge_microdata_fixed_width_file_to_parquet which does the conversion.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'Use this before converting fixed-width microdata to Parquet so you can choose selectedVariables without opening the full dictionary manually.' It provides clear context for when to use the tool, though it does not explicitly state when not to use it or list alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_list_cacheList Local IBGE CacheARead-onlyIdempotent
List files already downloaded into a local IBGE microdata cache.
Use this after one or more ibge_microdata_download_file calls to rediscover local paths, original ftp.ibge.gov.br URLs, byte sizes, and modification timestamps without hitting IBGE again. The tool only reads the local cache and supports limit/offset pagination.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum cached files to return. Defaults to 50 and is capped at 1000. | |
| offset | No | Number of cached files to skip for pagination. Defaults to 0. | |
| cacheRoot | Yes | Local cache root previously used with ibge_microdata_download_file. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and idempotentHint. Description adds that it only reads local cache and supports pagination via limit/offset, enhancing transparency. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences. First sentence states the core purpose, second provides usage context and details about returned data. No extra words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity, the description covers purpose, usage, behavior, and parameter roles. Annotations provide safety info. No output schema, but description lists return data types. Sufficiently complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and each parameter is described in the schema. The description mentions limit/offset for pagination but adds no new semantics beyond what the schema provides. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the verb 'list' and resource 'local IBGE microdata cache'. The title also reinforces this. It distinguishes itself from siblings like download_file and cleanup_cache by focusing on listing cached files.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says to use after download_file calls to avoid hitting IBGE again, providing clear context. No mention of when not to use, but the use case is well-defined.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_list_directoryList Official IBGE DirectoryARead-onlyIdempotent
List downloadable files in any official ftp.ibge.gov.br directory.
Use this for IBGE microdata families that do not yet have a survey-specific convenience tool. It only lists links; it does not download file bodies.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Official ftp.ibge.gov.br directory URL to list. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and idempotentHint. The description adds that it only lists links and does not download, which provides useful behavioral context beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences with no wasted words. The first sentence states the core action, the second provides usage context and limitations.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple listing tool with one parameter and no output schema, the description covers purpose, usage context, and limitations. It could optionally mention the return format, but it's sufficient for an agent to use correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Only one parameter (url) with schema description covering its purpose. The description reinforces the URL domain but does not add extra details beyond the schema. Given 100% coverage, baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states the tool lists downloadable files in an official IBGE FTP directory. The description explicitly distinguishes it from survey-specific convenience tools, making the purpose precise and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says to use this tool for IBGE microdata families without a survey-specific convenience tool, and clarifies it only lists links, not download file bodies. This gives clear guidance on when and when not to use it, and hints at alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_list_filesList IBGE Microdata FilesARead-onlyIdempotent
List official IBGE microdata download files for a supported survey.
For PNAD Contínua quarterly files, pass survey="pnadc_trimestral" and a year such as 2024. For POF, pass survey="pof"; this returns known edition-level public archives for 2017-2018, 2008-2009, and 2002-2003. This tool lists URLs only; it does not download large ZIP files.
| Name | Required | Description | Default |
|---|---|---|---|
| year | No | Calendar year for PNAD Contínua quarterly files, e.g. 2024. | |
| survey | Yes | Microdata family to list: pnadc_trimestral or pof. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, and non-destructiveHint. The description adds value by clarifying it lists URLs only (no downloads) and specifies return scope for POF (edition-level archives). No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences with no fluff. First sentence states core purpose. Second provides concrete examples. Third adds a behavioral qualifier (no download). Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has no output schema, the description could detail return format (e.g., array of URLs) but it sufficiently conveys it returns URL listings. The examples and qualifier make it usable. Sibling tools are more complex, but this description is complete for a simple list tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds significant meaning: explains how 'survey' and 'year' interact (year required for PNAD, not for POF) and lists exact editions for POF. This exceeds schema-level descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the tool lists official IBGE microdata download files for supported surveys, with specific examples for PNAD Contínua and POF. It clearly distinguishes from sibling tools like ibge_microdata_download_file by noting it lists URLs only and does not download.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear usage context with parameter examples (survey='pnadc_trimestral' with year, survey='pof' without year). It implicitly distinguishes from download tools but does not explicitly state when not to use or list alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_list_surveysList IBGE Microdata SurveysARead-onlyIdempotent
List the IBGE microdata families currently supported by this local-first MCP.
Use this first when deciding whether the server can help with PNAD Contínua, POF, or another IBGE microdata source. This tool does not download data.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint, covering behavioral traits. The description adds the specific note 'This tool does not download data,' reinforcing safety. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences: one for purpose and one for usage guidance. Every word earns its place with no redundancy or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple listing tool with no parameters and no output schema, the description is fully sufficient. It tells the agent when to use it, what it does, and what it does not do.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters, so the baseline is 4. No parameter documentation is needed, and the description does not attempt to document parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the action ('List') and the resource ('IBGE microdata families'), and distinguishes from other tools by clarifying it does not download data. It also mentions the server is 'local-first,' adding context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly advises 'Use this first when deciding whether the server can help,' providing direct guidance on when to invoke this tool versus others. It implicitly contrasts with tools that download or process data.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_pnadc_analyze_fileAnalyze PNAD Contínua Text FileARead-onlyIdempotent
Analyze an extracted PNAD Contínua fixed-width TXT file using the official SAS/TXT input layout.
This is a PNAD-specific convenience helper for a small predefined set of variables. For custom public workflows, prefer converting selected variables to Parquet and using the generic query or weighted-distribution tools. Use it after downloading/extracting PNAD microdata locally when this predefined summary matches your task.
| Name | Required | Description | Default |
|---|---|---|---|
| dataPath | Yes | Local path to an extracted PNAD Contínua fixed-width TXT microdata file. | |
| layoutPath | Yes | Local path to the PNAD Contínua SAS/TXT input layout file. | |
| topPercents | No | Top weighted-value brackets as fractions, e.g. [0.01, 0.05, 0.1]. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide readOnlyHint, idempotentHint, and destructiveHint as true or false. The description adds that it operates on a small predefined set of variables, which is behavioral context beyond annotations. No contradiction.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise paragraphs, front-loaded with the core action. Every sentence adds value without redundancy. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (3 params, no output schema) and strong annotations, the description is mostly complete. It explains workflow position and limitations. Lacks explicit description of the output format, but 'predefined summary' is implied.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so all parameters have descriptions. The tool description does not add further parameter-specific meaning beyond the schema. Baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool analyzes a PNAD Contínua fixed-width TXT file using a SAS/TXT input layout. It distinguishes itself as a convenience helper for a predefined variable set, differentiating it from siblings like ibge_microdata_pnadc_analyze_zip (zip analysis) and generic query tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use: after downloading/extracting PNAD microdata locally when the predefined summary matches the task. Also provides an alternative: for custom workflows, prefer converting to Parquet and using generic tools. This gives clear guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_pnadc_analyze_zipAnalyze PNAD Contínua ZIP EntryARead-onlyIdempotent
Analyze a PNAD Contínua fixed-width TXT entry directly inside a local ZIP archive.
This is a PNAD-specific convenience helper for a small predefined set of variables and avoids extracting the full microdata TXT first. For custom public workflows, prefer converting selected variables to Parquet and using the generic query or weighted-distribution tools. Use it after downloading a PNAD ZIP and extracting or otherwise providing the official input layout when this predefined summary matches your task.
| Name | Required | Description | Default |
|---|---|---|---|
| zipPath | Yes | Local path to a PNAD Contínua ZIP archive downloaded from IBGE. | |
| entryName | No | Exact ZIP entry name to analyze. If omitted, the first PNADC .txt entry is used. | |
| layoutPath | Yes | Local path to the PNAD Contínua SAS/TXT input layout file. | |
| topPercents | No | Top weighted-value brackets as fractions, e.g. [0.01, 0.05, 0.1]. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the description adds value by stating it 'avoids extracting the full microdata TXT first' and works with a 'predefined set of variables,' which are behavioral traits not fully captured by annotations. These details inform the agent about the tool's limited scope and non-destructive nature.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three concise sentences. The first sentence states the core function. The second explains its niche value and alternatives. The third provides usage context. Every sentence is necessary and contributes to clarity without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has 4 parameters, no output schema, and the description explains its purpose and when to use it. However, it does not specify which 'predefined set of variables' is analyzed, leaving a gap for the agent. It also does not describe the return format or results of the analysis. While adequate given annotations and sibling context, the missing variable list and output details reduce completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, so the schema already explains the four parameters. The description mentions 'predefined set of variables' but does not enumerate them, nor does it add formatting or constraints beyond the schema. Baseline 3 is appropriate as the schema carries the semantic burden.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool analyzes a PNAD Contínua fixed-width TXT entry inside a local ZIP archive. It specifies it's a PNAD-specific convenience helper for a small predefined set of variables, distinguishing it from siblings like 'ibge_microdata_pnadc_analyze_file' (which analyzes an extracted file) and 'ibge_microdata_fixed_width_zip_to_parquet' (which converts). The verb 'analyze' and resource 'ZIP entry' are specific and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage guidance: 'Use it after downloading a PNAD ZIP and extracting or otherwise providing the official input layout when this predefined summary matches your task.' It also advises when not to use it: 'For custom public workflows, prefer converting selected variables to Parquet and using the generic query or weighted-distribution tools.' This clearly distinguishes when to use this tool versus alternative sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_pof_manifestInspect POF Dictionary ManifestARead-onlyIdempotent
Parse the POF Excel variable dictionary and return record sheets, mapped TXT data entries, record lengths, and variable layouts.
Use this after downloading/extracting the POF documentation ZIP to understand which POF record to convert and which variables to select.
| Name | Required | Description | Default |
|---|---|---|---|
| search | No | Optional case-insensitive search over POF variable names and descriptions. | |
| dataZipPath | No | Optional local path to a POF Dados ZIP. If provided, dictionary records are matched against real ZIP entries. | |
| variableLimit | No | Maximum variables to return per record. Defaults to 50 and is capped at 1000. | |
| dictionaryPath | Yes | Local path to the POF Excel dictionary workbook, usually Dicionários de váriaveis.xls. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations (readOnlyHint=true, idempotentHint=true, destructiveHint=false) already declare safe behavior. The description adds context about what the tool does with the dictionary file (parse and return structured data), complementing annotations without contradicting them. No extra behavioral details beyond what annotations cover, but the description is appropriate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences: first defines what the tool does, second provides usage context. No unnecessary words or repetition. Ideal conciseness for a tool with clear purpose and well-documented schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description adequately lists what is returned (record sheets, mapped data entries, record lengths, variable layouts). For a manifest inspection tool, this is sufficient. Could mention that it also handles search or dataZipPath, but those are already in the schema. Overall complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, with all parameters having clear descriptions (e.g., 'search' as optional case-insensitive search). The description does not add new meaning beyond the schema; it focuses on overall purpose. Baseline 3 is appropriate since the schema already documents parameters well.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Parse' and resource 'POF Excel variable dictionary', and lists what it returns (record sheets, mapped TXT data entries, record lengths, variable layouts). The title 'Inspect POF Dictionary Manifest' reinforces the purpose. It clearly distinguishes from sibling tools, none of which mention POF dictionary or manifest.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The second sentence explicitly says to use this tool 'after downloading/extracting the POF documentation ZIP' and to 'understand which POF record to convert and which variables to select'. This provides clear context and implies alternatives (other tools for conversion). Could be improved with explicit when-not-to-use, but the guidance is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_pof_zip_record_to_parquetConvert POF ZIP Record to ParquetAIdempotent
Convert one POF fixed-width TXT record inside a local Dados ZIP into Parquet using the POF Excel dictionary workbook.
This is the POF-specific optimized path: it understands POF record sheets, maps them to ZIP entries such as DOMICILIO.txt or RENDIMENTO_TRABALHO.txt, applies implied decimal scaling, and writes a local Parquet file for DuckDB queries.
| Name | Required | Description | Default |
|---|---|---|---|
| zipPath | Yes | Local path to the POF Dados ZIP archive downloaded from IBGE. | |
| rowLimit | No | Optional maximum number of non-empty rows to export, useful for smoke tests or previews. | |
| outputPath | Yes | Local destination path for the Parquet file to create. | |
| recordName | Yes | POF record sheet name or known TXT entry name, e.g. Domicílio, Morador, Rendimento do Trabalho, DOMICILIO.txt. | |
| dictionaryPath | Yes | Local path to the POF Excel dictionary workbook, usually Dicionários de váriaveis.xls. | |
| selectedVariables | No | Optional POF variable names to export. If omitted, all variables for the record are exported. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description explains that the tool converts, maps, applies decimal scaling, and writes a Parquet file. Annotations indicate idempotent and non-destructive behavior, and the description does not contradict them. It adds context about POF-specific processing beyond what annotations provide.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description consists of two efficient sentences. The first states the core action, and the second elaborates on the specific POF logic. Every word contributes meaning without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (6 parameters, no output schema), the description adequately covers purpose, usage context, and outcome (creating a Parquet file). It could mention output file overwriting behavior, but overall it is sufficient for an agent to understand what the tool does.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% coverage, but the description adds meaning by explaining how parameters like 'recordName' map to sheets like 'DOMICILIO.txt' and that decimal scaling is applied. This goes beyond the schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description specifies a specific verb ('Convert'), resource ('POF fixed-width TXT record inside a local Dados ZIP'), and context ('using the POF Excel dictionary workbook'). It distinguishes the tool from siblings like ibge_microdata_fixed_width_zip_to_parquet by calling it 'the POF-specific optimized path' and mentioning POF-specific details.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies using this tool for POF data instead of generic alternatives by stating 'This is the POF-specific optimized path'. However, it does not explicitly state when not to use it or name alternatives, though the sibling list provides context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_profile_parquet_viewsProfile Named Local IBGE Parquet ViewsARead-onlyIdempotent
Profile local Parquet files as named DuckDB views and return bounded exploratory statistics.
Use this after converting IBGE fixed-width microdata to Parquet and before writing custom SQL. The tool reports row counts, column types, null/non-null counts, optional numeric min/max/mean, frequent values, and optional sample rows. By default it profiles the first 25 columns to keep exploration bounded; pass columns for a precise subset.
| Name | Required | Description | Default |
|---|---|---|---|
| topK | No | Number of most frequent values to return per profiled column. Defaults to 5 and is capped at 50. | |
| views | Yes | Named local Parquet views to profile. | |
| columns | No | Optional specific column names to profile. If omitted, the first maxColumns columns are profiled. | |
| maxColumns | No | Maximum columns to profile when columns is omitted. Defaults to 25 and is capped at 200. | |
| sampleRows | No | Number of sample rows to return per view. Defaults to 0 and is capped at 100. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Adds detail beyond annotations by listing reported statistics (row counts, column types, null/non-null counts, optional numeric summaries, frequent values, sample rows) and mentions bounded exploration. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short paragraphs, four sentences total. Every sentence adds value: first defines purpose and output, second gives usage guidance and defaults. No redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers purpose, output components, usage timing, default behavior, and options. Could be more complete by describing the return format explicitly, but given no output schema, the description is fairly comprehensive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. Description provides no additional param-specific details beyond schema descriptions; it reiterates overall behavior but does not enrich parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool profiles local Parquet files as DuckDB views and returns bounded exploratory statistics. It distinguishes from sibling tools like query or describe by specifying the context 'after converting... and before writing custom SQL'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Directly advises 'Use this after converting IBGE fixed-width microdata to Parquet and before writing custom SQL.' Also explains default column behavior and alternative to pass specific columns. However, it does not explicitly mention when not to use or name alternative tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_query_parquetQuery Local IBGE ParquetARead-onlyIdempotent
Run a bounded read-only DuckDB SELECT/WITH query over local Parquet files.
The provided files are exposed as a view named microdata. Use this after converting IBGE fixed-width microdata to Parquet when you need repeated summaries, grouped tabulations, or weighted statistics without reparsing the original TXT files.
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | Read-only SELECT or WITH query against the microdata view. Semicolons and write keywords are rejected. | |
| maxRows | No | Maximum rows to return. Defaults to 1000 and is capped at 10000. | |
| parquetPaths | Yes | Local Parquet file paths to expose as a DuckDB view named microdata. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description adds 'bounded' and query constraints (semicolons rejected), but beyond that, it does not significantly expand on behavioral traits like error handling or performance specifics.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the core action in the first sentence and usage context in the second. No unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given full schema coverage and annotations covering safety and idempotence, the description provides sufficient context for use after conversion. It lacks explicit description of return format but that is somewhat implied by the SQL query nature.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the description adds no additional parameter semantics beyond what is in the schema. The description mentions the 'microdata' view name, which is also implied in the schema text for `sql`.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool runs a read-only DuckDB SELECT/WITH query over local Parquet files, specifying the bounded nature. It gives a specific use case (post-conversion) but does not explicitly differentiate from the sibling `ibge_microdata_query_parquet_views`, though the context implies a distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says to use this tool after converting IBGE fixed-width microdata to Parquet for repeated summaries or tabulations. It provides when-to-use context but does not mention when not to use or compare with alternatives directly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_query_parquet_viewsQuery Named Local IBGE Parquet ViewsARead-onlyIdempotent
Run a bounded read-only DuckDB SELECT/WITH query over multiple named local Parquet views.
Use this for relational microdata workflows, especially POF, where separate records such as domicilio, morador, and rendimento_trabalho should be joined by their shared keys after conversion to Parquet.
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | Read-only SELECT or WITH query against the named views. Semicolons and write keywords are rejected. | |
| views | Yes | Named local Parquet views to create before running SQL. | |
| maxRows | No | Maximum rows to return. Defaults to 1000 and is capped at 10000. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate read-only, idempotent, non-destructive behavior. The description adds that the query is bounded (maxRows), uses DuckDB, and rejects semicolons/write keywords, providing valuable context beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description consists of two sentences: one terse functional statement and one with use case. Every sentence earns its place, and the key action is front-loaded with no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity, schema coverage, and annotations, the description explains the purpose and use case adequately. It mentions boundedness and read-only behavior but does not describe the output format, which might be inferred. Siblings like profile/describe tools are addressed elsewhere.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds high-level usage context and examples of view names, but does not elaborate on parameters beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool runs bounded read-only DuckDB SELECT/WITH queries over multiple named local Parquet views, specifying the verb, resource, and constraints. It distinguishes from siblings like ibge_microdata_query_parquet by emphasizing multiple views and joining.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly advises use for relational microdata workflows, especially POF, with examples of views to join. It does not explicitly mention when not to use or contrast with alternatives, but the context and name provide implicit differentiation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_weighted_distributionAnalyze Weighted IBGE DistributionARead-onlyIdempotent
Calculate weighted distribution summaries and top-bracket shares over local IBGE Parquet views.
Use this after converting microdata to Parquet when you need income, consumption, wealth, or other distribution statistics without hand-writing all aggregation SQL. Provide unitSql as a read-only SELECT/WITH query that returns a numeric value column, a numeric weight column, and optionally a group column. The tool ranks units by value, computes total weight/value/mean, group population and value shares, and top brackets such as top 1%, 5%, and 10%. Cutoff ties are allocated proportionally across groups.
| Name | Required | Description | Default |
|---|---|---|---|
| views | Yes | Named local Parquet views to create before calculating the distribution. | |
| unitSql | Yes | Read-only SELECT/WITH query that returns one row per analytical unit with value, weight, and optional group columns. | |
| maxGroups | No | Maximum group summaries to return. Defaults to 100 and is capped at 1000. | |
| groupColumn | No | Optional column name from unitSql used for group breakdowns, e.g. region or category. | |
| topPercents | No | Top brackets as fractions, e.g. [0.01, 0.05, 0.1]. Defaults to [0.01, 0.05, 0.1]. | |
| valueColumn | Yes | Column name from unitSql containing the income, consumption, wealth, or other value to rank. | |
| weightColumn | Yes | Column name from unitSql containing the survey/sample weight. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly, idempotent, and non-destructive. The description adds behavioral context: it creates views temporarily, ranks units, computes statistics, and handles ties proportionally. No contradiction with annotations. Adds useful detail beyond the safety profile.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences, front-loading the purpose and then providing usage details. No wasted words; each sentence adds value. Structure is logical and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
While the description covers main functionality and parameters, it lacks explicit output structure details (e.g., JSON format, column names) because no output schema exists. For a 7-parameter tool, it is fairly complete but could elaborate on return format and error constraints.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds meaning by explaining unitSql as a read-only query returning specific columns, and clarifying defaults for topPercents and maxGroups. This adds moderate value over the schema alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool computes weighted distribution summaries and top-bracket shares over local IBGE Parquet views. It specifies the input (unitSql) and outputs (total weight/value/mean, group shares, top brackets). This distinguishes it from sibling tools like generic query or profile tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use: after converting microdata to Parquet when distribution statistics are needed without manual SQL. It implies non-use for other purposes and provides workflow context, though it does not name alternative sibling tools directly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ibge_microdata_zip_entriesList ZIP EntriesARead-onlyIdempotent
List file entries inside a local IBGE ZIP archive without extracting the archive.
Use this after ibge_microdata_download_file to discover the exact TXT, documentation, or table names inside official IBGE microdata ZIPs.
| Name | Required | Description | Default |
|---|---|---|---|
| zipPath | Yes | Local path to a ZIP archive downloaded from IBGE. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide readOnlyHint, idempotentHint, and destructiveHint. The description adds key behavioral context: it lists entries 'without extracting the archive' and targets 'local IBGE ZIP archive', implying a read-only operation. This goes beyond annotations and clarifies the non-destructive nature.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise: two sentences, front-loaded with the primary action, no extraneous words. Every sentence adds value—first defines the tool, second gives usage context.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has one parameter, no output schema, and strong annotations, the description is fairly complete. It explains the purpose, workflow, and outcome (discovering file names). However, it could briefly mention the output format (e.g., list of filenames) for full completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with a clear description for zipPath. The description does not add new semantics beyond the schema (it reinforces the purpose but doesn't elaborate on path format or constraints). Per guidelines, baseline 3 is appropriate since the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states exactly what the tool does: 'List file entries inside a local IBGE ZIP archive without extracting the archive.' It uses a specific verb ('list') and resource ('file entries inside a local IBGE ZIP archive'). It distinguishes from sibling tools like ibge_microdata_extract_zip_entry by noting it does not extract, and it mentions the use case of discovering exact TXT, documentation, or table names.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly advises when to use the tool: 'Use this after ibge_microdata_download_file to discover the exact TXT, documentation, or table names inside official IBGE microdata ZIPs.' This provides clear context and a recommended workflow, though it does not explicitly mention when not to use or compare with alternatives beyond extract_zip_entry.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
22 tool updates
v0.1.0- First observed
ibge_microdata_cleanup_cache - First observed
ibge_microdata_describe_parquet_views - First observed
ibge_microdata_discover - First observed
ibge_microdata_download_file - First observed
ibge_microdata_extract_zip_entry - First observed
ibge_microdata_file_info - First observed
ibge_microdata_fixed_width_file_to_parquet - First observed
ibge_microdata_fixed_width_zip_to_parquet - First observed
ibge_microdata_inspect_layout - First observed
ibge_microdata_list_cache - First observed
ibge_microdata_list_directory - First observed
ibge_microdata_list_files - First observed
ibge_microdata_list_surveys - First observed
ibge_microdata_pnadc_analyze_file - First observed
ibge_microdata_pnadc_analyze_zip - First observed
ibge_microdata_pof_manifest - First observed
ibge_microdata_pof_zip_record_to_parquet - First observed
ibge_microdata_profile_parquet_views - First observed
ibge_microdata_query_parquet - First observed
ibge_microdata_query_parquet_views - First observed
ibge_microdata_weighted_distribution - First observed
ibge_microdata_zip_entries
TDQS
Scored across 22 tools
Each tool targets a distinct operation in the IBGE microdata workflow, such as browsing remote directories, downloading files, managing cache, extracting ZIP entries, converting formats, inspecting layouts, and running queries. Overlaps are minimal and clearly differentiated by context (e.g., list_directory vs list_files vs list_cache, or query_parquet vs query_parquet_views).
All tools follow a consistent 'ibge_microdata_action_noun' pattern using snake_case. The naming is predictable, with verbs like cleanup, describe, discover, download, extract, etc., followed by the target object. No mixing of conventions (e.g., camelCase or abbreviations) is observed.
22 tools is slightly above the typical 3-15 range, but the domain (IBGE microdata handling) is complex, covering caching, FTP navigation, multiple survey families (PNAD, POF), conversion to Parquet, and analytical queries. Each tool serves a distinct purpose, so the count feels justified rather than bloated.
The tool set covers the full lifecycle: discovery (list surveys, directories, files), acquisition (file info, download), extraction (ZIP entries, extract entry), inspection (layout, manifest), conversion (fixed-width to Parquet, survey-specific conversions), cache management (list, cleanup), and analysis (profile, query, weighted distribution). No obvious gaps for the stated purpose.
Maintenance
Related MCP Connectors
Query, join, profile, clean and convert CSV/JSON/Parquet with server-side DuckDB over MCP.
MCP server for Brazilian Federal Senate open data (legislative, administrative, e-Cidadania).
UN FAOSTAT global food & agriculture statistics over a local SQLite mirror, via MCP.
Discover, resolve, and query official Brazilian economic data with semantic search and provenance.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server for discovering, downloading, querying, and analyzing datasets from Ontario's open data portals, allowing natural language questions and high-performance analytics via DuckDB.231MIT
- AlicenseNot gradedqualityDmaintenanceMCP server to query public open data from Recife, Brazil using natural language. It exposes tools for schema exploration and SQL query generation via Gemini 2.5 Flash, backed by a local DuckDB database.1MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for accessing IBGE (Brazilian Institute of Geography and Statistics) data, enabling natural language queries via the Pipeworx gateway.1 npmMIT
- AlicenseAqualityBmaintenanceExposes official IBGE data as MCP tools, including Brazilian localities, SIDRA statistical aggregates, and population indicators.11MIT