Skip to main content
Glama

Get company by CNPJ

get_cnpj
Read-onlyIdempotent

Open public samples; up to 5 free lookups/day with an account, or paid per call/package: registration status, public sanctions and federal tax debt already joined by CNPJ. Set temas=dados,sancoes,divida; read data.situacao.label, data.sancoes.vigentes and data.dividaAtiva.inscricoes. health gives the registry snapshot date; inspect each block's dates. situacao.data is the status-change date. CNIA may be old; require a source check during this request with consulta_cnpj and cnia_atual=true. Personal details stay masked. Other topics and fields are in the catalog. Receita, four CGU sanction registries, the TCU list and PGFN debt are already joined by CNPJ. Check the company without consulting and combining each source separately. Read import.dump_date at /api/health for the registry snapshot, sancoes.conferidoEm for each sanction source and dividaAtiva.referencia for PGFN. situacao.data is the status-change date. Null means unchecked. These records are not a credit-bureau report or an official certificate.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cnpj": "<cnpj>"
    },
    "name": "get_cnpj"
  }
}

Input Schema

NameRequiredDescriptionDefault
cnpjYes14 digits or the alphanumeric CNPJ.
temasNoComma-separated topics: dados, contagens, socios, sancoes, fiscal, divida, obras, trabalho, ibama, contratos, pep, vendas, campanhas, prefeituras, sicaf, aeronaves, fundos, rntrc, bndes, registros; todos. Omit for the full record. Basic company data always stays. contagens adds a contagens object with only the record counts (socios, pep, sancoes, fiscal, socioambiental, governo, registros). Unrequested blocks are omitted; null means unchecked. Personal data remains masked.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / temas / description
      Previous value: -"Comma-separated topics: dados, socios, sancoes, fiscal, divida, obras, trabalho, ibama, contratos, pep, vendas, campanhas, prefeituras, sicaf, aeronaves, fundos, rntrc, bndes, registros; todos. Omit for the full record. Basic company data always stays. Unrequested blocks are omitted; null means unchecked. Personal data remains masked."New value: +"Comma-separated topics: dados, contagens, socios, sancoes, fiscal, divida, obras, trabalho, ibama, contratos, pep, vendas, campanhas, prefeituras, sicaf, aeronaves, fundos, rntrc, bndes, registros; todos. Omit for the full record. Basic company data always stays. contagens adds a contagens object with only the record counts (socios, pep, sancoes, fiscal, socioambiental, governo, registros). Unrequested blocks are omitted; null means unchecked. Personal data remains masked."
  2. Changed1 schema field changed
    • addedInput schema / properties / temas
      Added value: +{
      +  "description": "Comma-separated topics: dados, socios, sancoes, fiscal, divida, obras, trabalho, ibama, contratos, pep, vendas, campanhas, prefeituras, sicaf, aeronaves, fundos, rntrc, bndes, registros; todos. Omit for the full record. Basic company data always stays. Unrequested blocks are omitted; null means unchecked. Personal data remains masked.",
      +  "maxLength": 240,
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / cnpj / description
      Previous value: -"14 dígitos ou o CNPJ alfanumérico"New value: +"14 digits or the alphanumeric CNPJ."
  4. Changed1 schema field changed
    • changedInput schema / properties / cnpj / description
      Previous value: -"14 dígitos"New value: +"14 dígitos ou o CNPJ alfanumérico"
  5. First observed

TDQS

A4/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses commercial and behavioural traits the agent could not otherwise know: free-tier limits and per-call billing, that personal details stay masked, that CNIA may be stale and needs a per-request source check, that null means unchecked, and that results are neither a credit-bureau report nor an official certificate. It also identifies where freshness timestamps live (import.dump_date at /api/health, sancoes.conferidoEm, dividaAtiva.referencia).

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

Conciseness2/5

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

The content is valuable but poorly structured: purpose, pricing, field paths, freshness checks and caveats are run together in long comma-spliced sentences. The sentence 'situacao.data is the status-change date' is repeated verbatim, wasting space, and the operative routing advice for consulta_cnpj is buried mid-paragraph rather than front-loaded.

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

Completeness4/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-value burden and does so by naming the exact response paths and explaining staleness and null semantics. It also covers billing and masking. What remains thin is how much data a single call returns in volume and how the joined blocks relate to the optional temas flags.

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 baseline would be 3, but the description adds real meaning: it recommends a specific temas composition, explains that blocks are omitted and null means unchecked, and names the field paths to read (data.situacao.label, data.sancoes.vigentes, data.dividaAtiva.inscricoes). It adds no detail beyond the schema on the cnpj format or the 240-char limit.

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 resource and scope: registration status, public sanctions and federal tax debt already joined by CNPJ from Receita, CGU, TCU and PGFN, with the core value proposition ('check the company without consulting and combining each source separately'). It does not differentiate against named siblings such as dossier_cnpj or reveal_cnpj, so an agent must infer when a joined single-CNPJ lookup is preferred over a dossier.

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?

Gives concrete invocation guidance: set temas=dados,sancoes,divida for a lean call, use consulta_cnpj with cnia_atual=true when a fresh source check is required during the request, and check the catalog for other topics. It also mentions quota tiers (5 free lookups/day with an account, otherwise paid). Missing is explicit when-not-to-use guidance relative to the many neighbouring CNPJ tools.

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.