Skip to main content
Glama

search_fiscal_codes

Read-onlyIdempotent

Find a code from a description, or page through a table.

This is the tool for "what NCM is a keyboard" — the one the user actually asks. Prefer it over guessing a code from memory: the tables change, and a plausible wrong code is worse than a lookup.

Leaving kind unset searches every classification of that country at once, which is the most expensive call here. Set it whenever the question already names one.

Rows come back ordered by kind then code; there is no sort argument, and asking for one changes nothing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNoNarrows to one classification. All if unset.
termNoMatches the code or the description.
limitNoRows per page. 20 by default.
offsetNoRows to skip. Use it to page, not to narrow — a term is cheaper than paging to find one row.
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
dataNo
pageNo
totalNo
per_pageNo
next_pageNo
prev_pageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description reveals useful behavioral traits: unset `kind` searches all classifications and is the most expensive call, rows are ordered by kind then code, and there is no sort argument. This prevents the agent from inventing a sort parameter and sets clear performance expectations.

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 tightly written and front-loaded with the core purpose in the first sentence. Every subsequent sentence earns its place: cost guidance, when to set `kind`, and the no-sort behavior. It is appropriately sized for a tool with five parameters.

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 rich annotations, fully described schema, and output schema, the description covers the remaining practical concerns: use case, cost, paging, ordering, and absence of sorting. Nothing the agent needs to invoke the tool correctly is missing.

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 baseline is 3. The description adds meaningful guidance beyond the schema, especially for `kind` (unset means all classifications and is expensive; set it when the question names one). It also disambiguates the pagination intent with the "no sort" note. This lifts it above baseline.

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 clearly states the resource (fiscal codes) and the two main actions: searching by description and paging through the table. The example "what NCM is a keyboard" makes the purpose concrete, but it does not explicitly contrast with sibling tools like lookup_fiscal_code or list_fiscal_kinds, which keeps it just short of a 5.

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?

The description gives excellent usage context: prefer this lookup over guessing from memory, and set `kind` whenever the question already names one to avoid the most expensive call. It lacks explicit when-not-to-use statements naming sibling alternatives, so it stops short of fully explicit routing.

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.