Skip to main content
Glama

Get API X402 CNPJ by CNPJ

get_api_x402_cnpj_by_cnpj

CNPJ lookup paid per call, without an account: the Federal Revenue record, the sanctions, the tax standing and the address on the map. The same record as GET /api/consulta/cnpj/:cnpj, for agents: no account, no allowance and no pack. A request without payment gets the 402; a paid one gets the record in the same response, with the payment in uso. A lookup that fails or does not find the company is not charged.

Input Schema

NameRequiredDescriptionDefault
cnpjYesCNPJ with or without punctuation (14 characters).
temasNoComma-separated topics (up to 240 characters): 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; partners require socios. contagens adds a contagens object with only the record counts: socios, pep, sancoes, fiscal, socioambiental, governo and registros. Unrequested fields are omitted; null means an unchecked source. SICAF, aircraft and RNTRC select registry agencies; registros includes all agencies. Prices, limits and personal data masking do not change.
cnia_atualNotrue requires a CNIA source check during this request. Source failure returns 503 without charging or using a previous record. Default false. Include sancoes when selecting topics.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / cnia_atual
      Added value: +{
      +  "default": false,
      +  "description": "true requires a CNIA source check during this request. Source failure returns 503 without charging or using a previous record. Default false. Include sancoes when selecting topics.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / temas
      Added value: +{
      +  "description": "Comma-separated topics (up to 240 characters): 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; partners require socios. contagens adds a contagens object with only the record counts: socios, pep, sancoes, fiscal, socioambiental, governo and registros. Unrequested fields are omitted; null means an unchecked source. SICAF, aircraft and RNTRC select registry agencies; registros includes all agencies. Prices, limits and personal data masking do not change.",
      +  "type": "string"
      +}
  2. Added

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the charging model: failures and not-found lookups are not charged, a CNIA source failure returns 503 without charging or reusing a prior record, and the payment details appear in `uso` in the same response. It also explains that unrequested fields are omitted and null means an unchecked source. This is exactly the kind of cost/error-behavior context annotations cannot carry.

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 sentences, front-loaded with the core purpose and the payment model, then the endpoint equivalence, then error/charging semantics. Mild redundancy between 'without an account' and 'no account, no allowance and no pack', but nothing is wasted overall.

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 still covers what comes back (the record plus payment info in `uso`), what happens on failure (402 unpaid, 503 on source failure, no charge), and that omitted topics mean omitted fields. The shape of the record itself is only described indirectly via the `temas` enum, which is the main remaining gap.

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% and the `temas` and `cnia_atual` descriptions are already extremely detailed, so the schema does the heavy lifting. The description adds nothing parameter-specific beyond the note that payment lands in `uso`; 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?

Names a specific verb+resource (CNPJ lookup returning the Federal Revenue record, sanctions, tax standing, address) and pins the scope to a paid-per-call, account-free variant mapped to GET /api/consulta/cnpj/:cnpj. It differentiates by business model rather than by naming the near-identical siblings (consulta_cnpj, get_cnpj, dossier_cnpj, reveal_cnpj), so an agent still has to infer which sibling to prefer.

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?

States the selecting condition explicitly: use this when there is no account, no allowance and no pack, because payment is per call. It also describes the interaction flow (unpaid request returns 402, paid request returns the record). It stops short of naming an alternative tool for the account-holding case.

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.