Skip to main content
Glama
leorochasf

cnpj-mcp

by leorochasf

buscar_empresas_por_filtro

Find Brazilian establishments by state, CNAE, city, or legal nature; page through matching results with the returned cursor.

Instructions

Lista estabelecimentos por UF, CNAE, município e/ou natureza jurídica (API Minha Receita, sem chave). Informe ao menos um filtro. Paginado: repita a chamada com o "cursor" devolvido para a próxima página.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ufNoSiglas de UF, ex. ["GO"]
cnaeNoCNAE (7 dígitos), procurado no principal e nos secundários
cursorNoCursor devolvido pela página anterior
limiteNoItens por página (padrão 20)
municipioNoNome do município (exige uf) ou código IBGE
cnae_fiscalNoCNAE (7 dígitos), só como atividade principal
natureza_juridicaNoCódigo da natureza jurídica, ex. "2062"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose two behavioral traits: the no-key public API source and the cursor-based pagination contract. It omits how multiple filters combine (AND/OR), rate or result limits, and the return shape, so it is adequate but not rich.

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

Conciseness4/5

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

Three tight sentences with no filler, and the critical constraint ('Informe ao menos um filtro') is front-loaded before the pagination detail. Structure is efficient, only losing a point for packing source attribution into the purpose sentence.

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

Completeness3/5

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

For a 7-parameter, no-annotation, no-output-schema search tool, the description covers the required-filter rule and pagination, which are the two highest-risk behaviors. It leaves the response format and multi-filter combination semantics undocumented, so it is minimally sufficient rather than complete.

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

Parameters3/5

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

Schema coverage is 100%, so the schema already documents all seven parameters, and the description merely echoes the filter fields. It notably does not disambiguate the subtle cnae vs cnae_fiscal distinction present in the schema, so no value is added beyond structured data. Baseline 3 applies.

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

Purpose4/5

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

States a specific verb (Lista) and resource (estabelecimentos) and enumerates the four filter dimensions (UF, CNAE, município, natureza jurídica), plus names the data source. It is clear what the tool returns, though it never names a sibling like buscar_empresa_por_nome or empresas_no_endereco, so the agent must infer differentiation.

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

Usage Guidelines3/5

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

'Informe ao menos um filtro' gives an explicit minimum-input constraint, and the pagination sentence prescribes the repeat-with-cursor workflow. However, it never states when to prefer this tool over the many sibling search tools, nor any exclusions, so usage is only implied.

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