Skip to main content
Glama

Consultar CNPJ

consultar_cnpj
Read-onlyIdempotent

Retrieve Brazilian company registration data by CNPJ, including legal name, status, address, CNAE, Simples/MEI, and partners, to validate or research a business.

Instructions

Busca na base pública da Receita Federal os dados de uma empresa pelo CNPJ: razão social, nome fantasia, situação cadastral, data de abertura, atividades (CNAE), porte, natureza jurídica, endereço, Simples/MEI e quadro de sócios (nome e qualificação). Aceita CNPJ com ou sem pontuação, inclusive o alfanumérico.

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

Input Schema

NameRequiredDescriptionDefault
cnpjYesCNPJ com ou sem pontuação, ex.: 33.000.167/0001-01 ou 12ABC34501DE35

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and openWorld, so the safety profile is covered. The description adds real value beyond them by naming the upstream source (public Receita Federal base) and disclosing the full set of returned attributes, including the partner/shareholder list. It does not say what happens on an invalid or nonexistent CNPJ, nor mention rate limits.

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?

Two sentences, front-loaded with the action and source, followed by the returned fields and input format. The field enumeration is long but each item tells the agent something about the payload, so little is wasted.

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?

There is no output schema, so the description carries the burden of describing return values, and it does so thoroughly. The main remaining gap is failure behavior for invalid or unknown CNPJs, which matters for an open-world lookup tool.

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?

With a single parameter at 100% schema coverage, the schema already documents the accepted formats. The description's note about punctuation and alphanumeric CNPJ largely restates the schema example rather than adding new constraints or edge cases.

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 verb and resource ('Busca na base pública da Receita Federal os dados de uma empresa pelo CNPJ') and enumerates the returned fields, so the agent knows exactly what comes back. It does not differentiate itself from the sibling validar_cnpj, which an agent could plausibly confuse with a CNPJ lookup.

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 only implied: the agent can infer this is the tool for retrieving company registration data by CNPJ. There is no explicit when-to-use or when-not-to-use guidance, and no pointer to validar_cnpj for format/check-digit validation versus this tool for full data retrieval.

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