Skip to main content
Glama

lookup_cnpj

Consulta um CNPJ brasileiro (numérico ou alfanumérico) na base da CPFHub.io, com os mesmos dados de GET /cnpj/{cnpj}: razão social, nome fantasia, situação cadastral, endereço, CNAEs e quadro de sócios (CPF de sócio sempre mascarado). Cobra o custo de CNPJ do plano só quando o CNPJ é encontrado. Requer autenticação via API key.

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": "lookup_cnpj"
  }
}

Input Schema

NameRequiredDescriptionDefault
cnpjYesCNPJ a ser consultado, com ou sem formatação (ex.: 11.222.333/0001-81 ou 12ABC34501DE35)
api_keyNoSua API key da CPFHub.io (opcional se já enviada no header x-api-key da conexão)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden, and it delivers real behavioral facts: API key authentication is required, billing is charged only on a successful match, and partner CPF numbers are always masked. It does not cover rate limits, failure modes beyond 'not found', or response shape beyond the reference to GET /cnpj/{cnpj}.

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?

A single dense sentence that front-loads the action, resource, and data returned, followed by cost and auth constraints. Every clause carries information (fields, masking, billing, auth); it is long but not padded.

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?

For a two-parameter read tool with no output schema, the definition covers what is fetched, who can call it, what it costs, and what is redacted. The main remaining gap is guidance on error/pagination behavior and a cross-reference to the bulk or CPF siblings.

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 both parameters are documented in the schema, including the note that api_key is optional when sent via the x-api-key header, so the description's contribution is limited to reinforcing that CNPJ may be numeric or alphanumeric. That is baseline-appropriate but adds little beyond structured fields.

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?

The description opens with a specific verb and resource ("Consulta um CNPJ brasileiro ... na base da CPFHub.io") and enumerates the returned fields (razão social, nome fantasia, situação cadastral, endereço, CNAEs, quadro de sócios), so the agent knows exactly what it gets. It implicitly contrasts with the plural sibling bulk_lookup_cnpj by describing a single-CNPJ fetch, but never names an alternative explicitly.

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?

Usage is implied rather than stated: singular lookup of one CNPJ, with a billing caveat (charge only when found) that is genuinely useful context. There is no explicit when-to-use/when-not-to-use guidance and no pointer to bulk_lookup_cnpj or lookup_cpf for the bulk or CPF cases.

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