Skip to main content
Glama

Arquivix Notas · NFS-e

cnpj_lookup

Read-onlyIdempotent

Look up the public registration data of any CNPJ (legal name, trade name, address, IBGE municipality code, whether it is Simples Nacional or MEI, whether it is active, and its main activity (CNAE)). When the activity clearly matches a service code it also returns suggested_service_code: only a suggestion, not a confirmed code. The data can pre-fill a new company or a customer. It reads the public registry, not the companies registered in this workspace. Fails when the CNPJ is invalid, when the registry does not know it (CNPJ_NOT_FOUND) or when the registry has no answer right now (CNPJ_LOOKUP_UNAVAILABLE, temporary).

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

Input Schema

NameRequiredDescriptionDefault
cnpjYesCNPJ; punctuation is optional.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations (readOnly, openWorld, idempotent, non-destructive), the description discloses the external-source nature of the call and the full failure surface with error codes: invalid CNPJ, CNPJ_NOT_FOUND, and the explicitly temporary CNPJ_LOOKUP_UNAVAILABLE. It also flags the trust level of the derived field — 'suggested_service_code: only a suggestion, not a confirmed code' — which prevents an agent from treating an inference as verified data.

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?

The output-fields list and the workspace-registry distinction are front-loaded, and the caveat about the suggested code is placed directly after the field it qualifies. The middle section is a little dense and sentence fragments accumulate ('only a suggestion, not a confirmed code'), but nothing is filler given the absence of an output schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter read tool with no output schema, the description carries the full burden of describing return values and does so field by field, plus the trust caveat on the derived code. Combined with the enumerated error conditions and the read-only external source, an agent has everything needed to call it and interpret both success and failure.

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?

Only one parameter exists and schema coverage is 100%, with 'punctuation is optional' already documented in the schema, so the baseline is 3. The description does add adjacent value by noting that an invalid CNPJ causes failure, which tells the agent some validation happens, but it offers no format or length detail beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource ('Look up the public registration data of any CNPJ') and then enumerates exactly which fields come back (legal name, trade name, address, IBGE code, Simples/MEI, active status, CNAE). It also draws a hard boundary against the workspace-oriented siblings: 'It reads the public registry, not the companies registered in this workspace,' which separates it from company_get/company_list.

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?

It gives a concrete use case ('can pre-fill a new company or a customer'), which implies the natural pairing with company_create/customer_update, and it clarifies the one case where an agent might pick the wrong tool (workspace companies vs. public registry). It stops short of naming an alternative tool explicitly or stating when not to call it, so it is clear context rather than full routing guidance.

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