Skip to main content
Glama

Get company by CNPJ

get_cnpj
Read-onlyIdempotent

Brazilian company record by CNPJ (14 digits or the alphanumeric format), with the public records linked to the company in data: sanctions (CEIS, CNEP, CEPIM, leniency agreements and TCU) in data.sancoes; the last CNIA check of monitored companies in data.cnia (for a live check, use consulta_cnpj); federal tax debt (PGFN) in data.dividaAtiva, installment agreements in data.parcelamentos, the tax regime (ECF) in data.regimeTributario, tax incentives (SISEN, ECF, DIRBI and import waivers) in data.beneficiosFiscais and construction works (CNO) in data.obras; the Federal Revenue chronic tax debtor list in data.devedorContumaz (consta: true means barred from public tenders); environmental and labor risk in data.ambiental (Ibama fines and embargoes) and data.trabalhoEscravo (forced-labor list of the MTE); government contracts on PNCP in data.governo; partners on the politically exposed persons list (CGU) in data.pep; registrations with regulators (CVM, Central Bank, ANS, ANTT, ANP, ANEEL, Anatel, Anvisa, CNES, Cadastur and Ibama) in data.registros; BNDES financing in data.bndes; federal government disbursements in data.pagamentos; sales to federal agencies by invoice in data.notasFederais; federal contracts since 2013 in data.contratosFederais; and election campaigns that hired the company in data.campanhas. A partner who is a person comes with the name masked (LUIS F. R. P.), and so do the name and house number of an individual entrepreneur (MEI included), phone numbers and e-mail, with data.mascarado: true; a partner that is a company comes in full. The public answer can be reused for up to 6 hours; check the reference date of the records.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cnpjYes14 digits or the alphanumeric CNPJ.
temasNoComma-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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. 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."
  3. Changed1 schema field changed
    • changedInput schema / properties / cnpj / description
      Previous value: -"14 dígitos"New value: +"14 dígitos ou o CNPJ alfanumérico"
  4. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds real behavior beyond that: personal names, MEI house numbers, phone and e-mail stay masked with data.mascarado: true, null means unchecked, and answers are cached for up to 6 hours. It does not mention auth requirements or rate limits, so it is strong but not exhaustive.

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

Conciseness3/5

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

The purpose and the consulta_cnpj alternative are front-loaded, but the middle is a dense run-on enumeration of roughly thirty data blocks that pushes the operationally important masking and cache facts to the very end. Since no output schema exists the detail is defensible, but it is far longer than needed and poorly tiered.

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-shape burden and does so broadly, covering sanctions, tax, labor, contracts, PEP, regulator registrations and masking. Missing only edge behavior such as invalid-CNPJ handling and what empty result sets look like, which keeps it just short of complete.

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 both parameters are already documented, which sets the baseline at 3. The description adds genuine meaning on top by tying each data.* block to a topic category (sancoes, dividaAtiva, pep, campanhas, etc.), effectively mapping the temas enum-less string values to the payload sections an agent would want.

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?

The opening states the exact resource ('Brazilian company record by CNPJ') and enumerates the linked public-record blocks, so the agent knows precisely what comes back. It also differentiates itself from the sibling consulta_cnpj by naming it for live checks, so the two tools are distinguishable without opening either 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?

It gives one explicit routing rule — 'for a live check, use consulta_cnpj' — plus a freshness window ('reused for up to 6 hours') and the 'check the reference date' caveat, which tells the agent when the cached record is safe to trust. There is no statement of when not to use it or of prerequisites, so it falls short of a full when/when-not/alternative treatment.

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.