Skip to main content
Glama

lookup_taxpayer

Read-onlyIdempotent

Look up one taxpayer by exact tax id, to confirm who it is.

Use it to check a recipient's name before issuing against them. It takes the id exactly — punctuation is fine, but there is no search by name, by prefix or by state, and there will not be: the registry holds the names and addresses of real people.

A 404 does not mean the company does not exist. The registry reloads monthly from the RFB's dump, so a recently registered CNPJ is simply not in it yet. Say that to the user rather than reporting the tax id as invalid, and never turn a 404 here into a validation rule.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tax_idYesThe exact tax id. A CNPJ is 14 digits.
countryNoISO 3166-1 alpha-2 code. A code means nothing without it, and Brazil is the default rather than a guess.BR

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNoWhether it is a company or a person.
nameNo
stateNo
statusNo
tax_idNo
countryNo
metadataNoWhatever the registry holds beyond these.
city_codeNo
started_atNo
trade_nameNo
postal_codeNo
activity_codeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, openWorldHint=false, idempotentHint=true, and destructiveHint=falseikuha. The description adds essential behavioral context beyond these: the registry reloads monthly, so a 404 does not imply nonexistence. This is critical behavioral information that annotations do not convey, and it could easily lead to misinterpretation of lookup failures. The description does not contradict annotations.

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?

The description is appropriately sized, with no fluff. Key points are front-loaded: the primary purpose and usage scenario come firstainer, followed by the explicit exclusions and critical 404 handling. Each sentence earns its place, contributing crucial operational guidance. Perfectly structured for quick agent comprehension.

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?

Given the tool's simplicity (2 params, one required), an output schema exists to explain returns, and annotations cover safety/idempotency. The description covers all necessary usage details: exact match, no partial search, the 404 caveat, and how to handle it. Nothing gaping missing for an agent to call correctly.

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 the schema already documents parameters. The description adds important context for both parameters: the tax_id must be exact and allows punctuation, and clarifies the 14-digit format for CNPJ (though schema says that). For country, the description notes that 'a code means nothing without it' (reinforcing the need for context) and explains the default is Brazil as a deliberate choice, not a guess. This adds value 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 clearly states the tool's specific purpose: 'Look up one taxpayer by exact tax id, to confirm who it is.' It distinguishes this from name/prefix search, explicitly noting there is no search by those means presumably available in sibling tools. The verb+resource is specific, and it names the exact scenario (check recipient's name before issuing).

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

Usage Guidelines5/5

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

The description provides explicit guidance: use it to confirm identity before issuing against a recipient. It explicitly states when not to use it: no search by name, prefix, or state. It also handles the 404 edge case, instructing the agent to explain to the user rather than report invalid, and never to turn a 404 into a validation rule. This is thorough usage 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.