Skip to main content
Glama

Look up a company by CNPJ

lookup_cnpj
Read-onlyIdempotent

Look up Brazilian company registry details by CNPJ to verify existence and active status, and retrieve legal name, address, tax regime, and partners.

Instructions

Public registry data for a Brazilian company (Receita Federal, via BrasilAPI): legal name, registration status, main activity, address, size, tax regime and partners (QSA). Accepts a CNPJ with or without punctuation, including the alphanumeric format. Partner CPFs come masked by the registry. Use it to check that a company exists and is active.

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, for example "00.000.000/0001-91" or "00000000000191"
include_partnersNoInclude the partners list (default true); false keeps the answer short

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and open-world, so the description's added value is the data provenance (Receita Federal via BrasilAPI), the fact that partner CPFs are masked by the registry, and accepted input formats. It omits error behavior for nonexistent or malformed CNPJs, which would matter for an open-world lookup.

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?

Three tight sentences: returned fields first, then accepted input format plus the masking caveat, then the use case. Every sentence carries information an agent needs and none is redundant padding.

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 does the necessary work by enumerating the returned fields and flagging masked partner CPFs. The main remaining gap is what happens on an invalid or unknown CNPJ, which is relevant for a single-argument open-world lookup.

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 baseline would be 3; the description earns an extra point by noting the CNPJ may be punctuated or unpunctuated and may be in the alphanumeric format — information the schema's numeric-only examples do not convey. The include_partners explanation largely repeats the schema description.

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 ('Look up a company by CNPJ') and enumerates the returned data: legal name, status, main activity, address, size, tax regime and partners. It does not explicitly name the sibling validate_cnpj, so the boundary with checksum-only validation is left implicit, but the 'check that a company exists and is active' framing helps distinguish them.

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?

Gives clear usage context: 'Use it to check that a company exists and is active,' and adds a practical hint for include_partners ('false keeps the answer short'). It stops short of explicit exclusions or naming the alternative tool for pure format validation.

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