Skip to main content
Glama

Brazil CNPJ company registry

lookup_codes

Look up Receita's code tables by text or code. kind: cnae (activity), natureza_juridica (legal form), municipio, motivo (reason for status), qualificacao (partner role), pais. CNAE text returns ranked candidates using exact descriptions, curated everyday aliases, word matches and spelling suggestions. Read match_type, match_note and every official description; ambiguous terms are not an automatic classification. Numeric codes/prefixes keep the original lookup. Other tables use literal text. Use this before sector or municipio filtering.

Input Schema

NameRequiredDescriptionDefault
kindYes
textYes
limitNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it explains CNAE ranking (exact descriptions, curated aliases, word matches, spelling suggestions), instructs the agent to read match_type/match_note, and warns that ambiguous terms are not an automatic classification. It does not cover permissions or limits of the lookup, but the interpretive behavior is well disclosed.

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?

Front-loaded with purpose, then kind enumeration, then behavioral guidance, all in dense but purposeful sentences. Nothing is redundant, though the run of clauses is slightly packed for quick scanning.

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?

The description supplies the interpretation context needed for a reference-lookup tool and an output schema handles return values. The main residual gap is the undocumented `limit` parameter; otherwise an agent has enough to call it 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 0%, so the description must compensate, and it largely does: it enumerates the valid `kind` values (cnae, natureza_juridica, municipio, motivo, qualificacao, pais) and explains that `text` behaves differently for CNAE text vs numeric codes vs literal-text tables. Only the `limit` parameter is left unexplained.

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?

States a specific verb ('look up') and resource ('Receita's code tables by text or code') and enumerates the exact table kinds it resolves. An agent can distinguish this reference-lookup tool from the company/partner search siblings without opening the schema.

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?

Explicitly directs the agent to 'Use this before sector or municipio filtering', giving a clear prerequisite ordering relative to the search siblings. It also distinguishes numeric-code lookups from free-text lookups, though it does not name a specific sibling alternative to use instead.

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.