Skip to main content
Glama

Buscar CNPJs por atividade e município

buscar_cnpjs
Read-only

Lista estabelecimentos ativos da base da Receita Federal pela atividade econômica principal (CNAE, 7 dígitos) e/ou pelo município (código da Receita com 4 dígitos ou do IBGE com 7); pelo menos um dos dois filtros. Devolve {dataset_month, total, resultados, proximo_cursor}: cada resultado tem os dados cadastrais da consulta individual, sem o quadro de sócios. A página tem no máximo o limite por minuto do plano (ou o argumento limite, até esse valor) e cada CNPJ devolvido consome 1 da cota mensal e 1 do limite por minuto; a próxima página vem com cursor = proximo_cursor (null no fim). Exige a conta apipj, como consultar_cnpj.

Input Schema

NameRequiredDescriptionDefault
cnaeNoCNAE da atividade principal, 7 dígitos, com ou sem pontuação (ex.: 4781400 ou 47.81-4-00)
cursorNoproximo_cursor da página anterior, com os mesmos filtros
limiteNoTamanho máximo da página, de 1 até o limite por minuto do plano (padrão: esse limite)
formatoNocompleto (padrão) ou simplificado, como em consultar_cnpj (sem sócios)completo
municipioNoCódigo do município da Receita (4 dígitos, ex.: 7107 = São Paulo) ou do IBGE (7 dígitos, ex.: 3550308)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, non-destructive), yet the description goes well beyond them: it discloses quota consumption per CNPJ (1 cota mensal + 1 do limite por minuto), that page size is capped by the plan's per-minute limit, that cursor = proximo_cursor with null at the end, and that the apipj account is required. These are exactly the operational facts an agent needs before calling a metered endpoint.

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?

Front-loaded with purpose and filter constraint, then the return shape, then cost/pagination, then auth. Dense and mostly waste-free, though the middle sentence packs return shape and quota accounting together, making it heavier than necessary to scan.

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

Completeness5/5

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

With no output schema, the description carries the return contract itself ({dataset_month, total, resultados, proximo_cursor}) and explains pagination termination and metering. Combined with annotation-covered safety and fully documented params, an agent has everything needed to call it correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description adds the cross-parameter constraint that at least one of cnae/municipio must be supplied (the schema marks neither required) and ties 'limite' to the plan's per-minute ceiling. It adds real semantics but leaves formato's behavior to the schema/sibling reference.

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

Purpose5/5

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

States a specific verb and resource ('Lista estabelecimentos ativos da base da Receita Federal') plus the exact filters (CNAE principal, município). The clause 'cada resultado tem os dados cadastrais da consulta individual, sem o quadro de sócios' implicitly separates it from the single-record sibling consultar_cnpj, so an agent can tell list-from-lookup without opening a schema.

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

Usage Guidelines4/5

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

Explicitly imposes the selection constraint 'pelo menos um dos dois filtros', which is the key precondition for calling this tool, and points to consultar_cnpj for the account requirement and formato semantics. It does not state when to prefer this over validar_cnpj or status_base, so it stops short of full alternative routing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources