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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_fiscal_codes"
  }
}

Input 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

NameRequiredDescriptionDefault
dataNo
pageNo
totalNo
per_pageNo
next_pageNo
prev_pageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed19 schema fields changed
    • removedInput schema / properties / country / title
      Removed value: -"Country"
    • removedInput schema / properties / kind / title
      Removed value: -"Kind"
    • removedInput schema / properties / limit / title
      Removed value: -"Limit"
    • removedInput schema / properties / offset / title
      Removed value: -"Offset"
    • removedInput schema / properties / term / title
      Removed value: -"Term"
    • removedInput schema / title
      Removed value: -"search_fiscal_codesArguments"
    • removedOutput schema / $defs / FiscalReferenceItem / properties / code / title
      Removed value: -"Code"
    • removedOutput schema / $defs / FiscalReferenceItem / properties / country / title
      Removed value: -"Country"
    • removedOutput schema / $defs / FiscalReferenceItem / properties / description / title
      Removed value: -"Description"
    • removedOutput schema / $defs / FiscalReferenceItem / properties / kind / title
      Removed value: -"Kind"
    • removedOutput schema / $defs / FiscalReferenceItem / properties / metadata / title
      Removed value: -"Metadata"
    • removedOutput schema / $defs / FiscalReferenceItem / title
      Removed value: -"FiscalReferenceItem"
    • removedOutput schema / properties / data / title
      Removed value: -"Data"
    • removedOutput schema / properties / next_page / title
      Removed value: -"Next Page"
    • removedOutput schema / properties / page / title
      Removed value: -"Page"
    • removedOutput schema / properties / per_page / title
      Removed value: -"Per Page"
    • removedOutput schema / properties / prev_page / title
      Removed value: -"Prev Page"
    • removedOutput schema / properties / total / title
      Removed value: -"Total"
    • removedOutput schema / title
      Removed value: -"FiscalReferenceList"
  2. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, and closed-world behavior, so the bar is lower; the description still adds real value by disclosing that leaving `kind` unset is the most expensive call, that rows are ordered by kind then code, and that no sort parameter is honored. It does not discuss result volume or paging termination, which would complete the cost picture.

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 core guidance is front-loaded in the first two sentences, and each subsequent sentence carries actionable information about cost, ordering, and absent sort support. The reasoning-style aside ('a plausible wrong code is worse than a lookup') is slightly discursive but short.

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?

With an output schema, full annotation coverage, and a fully documented parameter set, the description only needs to add operating guidance, which it does: cost of unset `kind`, result ordering, and the absence of sorting. For a read-only search tool of this complexity, nothing an agent needs in order to call it 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 a baseline of 3 applies, but the description adds genuine semantics beyond the schema by explaining the cost consequence of an unset `kind` and reinforcing that `offset` is for paging rather than narrowing. Matching behavior of `term` (substring, fuzzy, code vs. description) is still left to the schema.

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 first sentence states a specific verb and resource ('Find a code from a description, or page through a table') and names the two operating modes, search vs. browsing. It does not clearly differentiate against the similarly named sibling lookup_fiscal_code, leaving some ambiguity about which is the exact-lookup path.

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 usage scenario ('what NCM is a keyboard') and an explicit alternative to avoid ('guessing a code from memory'), plus a conditional rule for setting `kind` based on whether the question names a classification. It stops short of saying when a different lookup tool should be used 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.