Skip to main content
Glama

Consultar CNPJ

consultar_cnpj
Read-onlyIdempotent

Retrieve public Brazilian company records by CNPJ, including legal name, registration status, address, CNAE, size, Simples/MEI status, and partners.

Instructions

Consulta os dados públicos de uma empresa na Receita Federal: razão social, situação cadastral, endereço, CNAE, porte, Simples/MEI e quadro de sócios.

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.: 00.000.000/0001-91
incluir_cnaes_secundariosNoInclui a lista de CNAEs secundários (padrão: false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so the safety profile is covered. The description adds useful context beyond that — the data comes from the Receita Federal and is public — and the field list hints at what comes back, including partner data. It does not cover behavior for invalid CNPJs, rate limits, or how the optional secondary-CNAE flag changes the response, which is why it stays at 3 rather than higher.

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

Conciseness5/5

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

A single well-formed sentence, front-loaded with the verb and data source, then the returned fields. No filler, no redundancy, nothing that could be cut without losing information.

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-only lookup with no output schema, the description usefully enumerates the returned fields, which compensates for the missing output schema. Parameter documentation is fully handled by the schema and annotations cover the safety profile. Only the response shape and failure behavior for bad CNPJs are unaddressed.

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 description coverage is 100%, and the schema already documents the CNPJ format (com ou sem pontuação, with an example) and the incluir_cnaes_secundarios flag with its default. The description adds nothing about either parameter beyond what is already structured. Baseline 3 is correct where the schema does the heavy lifting.

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 names a specific verb and resource ("Consulta os dados públicos de uma empresa na Receita Federal") and enumerates the data returned: razão social, situação cadastral, endereço, CNAE, porte, Simples/MEI and sócios. That lets an agent tell exactly what this tool does without opening the schema. It does not differentiate itself from sibling lookups, but siblings (CEP, DDD, ISBN, FIPE) are plainly different resources, so the omission is minor.

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 mention of "Receita Federal" plus the field list tells an agent this is the tool for company registration data. There is no explicit statement of when to use it, when not to, or which sibling to prefer for related lookups. Adequate but with clear guidance gaps.

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