Skip to main content
Glama

Look up CNPJ

lookup_cnpj
Read-onlyIdempotent

Retrieve Brazilian company registry details—legal name, status, main activity, and address—from a CNPJ via BrasilAPI. Use it to verify business records and populate ERP data.

Instructions

Public registry data of a company (legal name, status, main activity, address) via BrasilAPI.

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
cnpjYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description adds that data is fetched live from BrasilAPI, which is useful context, but it says nothing about failure behavior for malformed or non-existent CNPJs, rate limits, or whether results are cached.

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 compact sentence that front-loads the payload contents and tucks the data source at the end. It is efficient, though the noun-phrase framing lacks a verb and the parenthetical field list is slightly dense.

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

Completeness3/5

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

With no output schema, listing the returned fields is the right compensating move, and the source is disclosed. However, the definition leaves out input formatting and not-found/error semantics, which matter for a single-param external lookup tool with a same-domain sibling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for the single required parameter, so the description carries the full burden and does not meet it: it never says whether the cnpj must be raw digits or may include punctuation/formatting, despite the schema allowing up to 32 characters. This is exactly the ambiguity that causes failed calls.

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 resource (public registry data of a company) and enumerates the returned fields (legal name, status, main activity, address), so the agent knows exactly what it gets. It does not differentiate itself from the sibling validate_cnpj, which is a notable omission for a lookup tool in a CNPJ/Cpf family.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance at all: no mention of when to prefer this over validate_cnpj, nor any stated precondition (e.g., the input must be a well-formed CNPJ). Usage is only inferable from the tool name and the word 'registry data'.

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