Skip to main content
Glama

Search Customs Codes

search_customs_codes
Read-onlyIdempotent

Keyword/code search over the Combined Nomenclature (or PRODCOM).

Returns ranked {code, label, path} candidates. Prefer resolve_product_code for a one-call keyword-or-code helper; use this directly if you specifically want the raw ranked candidate list.

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": {
      "q": "<q>"
    },
    "name": "search_customs_codes"
  }
}

Input Schema

NameRequiredDescriptionDefault
qYesKeyword or code fragment to search for.
langNoLanguage for translated labels in the response; any other language is refused.en
limitNoMax number of candidates to return.
sourceNoNomenclature to search. A dotted PRODCOM code (e.g. '23.13') is auto-detected either way and reverse-mapped to CN codes.cn

Output Schema

NameRequiredDescriptionDefault
resultYesGET /api/reference/search — ranked candidates; ``matched_prodcom`` is set when the query was a dotted PRODCOM notation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / result / properties / results / items / required
      Previous value: -[
      -  "code"
      -]New value: +[
      +  "code",
      +  "label",
      +  "path",
      +  "via_prodcom"
      +]
    • changedOutput schema / properties / result / required
      Previous value: -[
      -  "query",
      -  "lang",
      -  "source",
      -  "results"
      -]New value: +[
      +  "query",
      +  "lang",
      +  "source",
      +  "matched_prodcom",
      +  "results"
      +]
  2. Added

TDQS

A4.2/5.0
Behavior3/5

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

The annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety and idempotency are covered without description help. The description adds only the notion that results are ranked, while the lang refusal rule and PRODCOM auto-detection are restatements of schema text rather than new behavioral context.

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?

Three short sentences, front-loaded with the purpose and return shape before the sibling routing note. Nothing is padded, though the line-broken formatting slightly fragments what is otherwise a tight statement.

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 present and full parameter documentation, the description only needs to establish purpose, return nature, and alternative-tool routing, all of which it does. An agent has everything required to select and invoke it correctly.

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

Parameters3/5

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

Schema description coverage is 100% and every parameter (q, lang, limit, source) is documented inline, including enum restriction, default, and the PRODCOM auto-detection behaviour. The description adds no syntax or interpretation guidance beyond that, so the baseline 3 applies.

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 names a specific verb+resource ('Keyword/code search over the Combined Nomenclature (or PRODCOM)') and immediately states the shape of what comes back ('ranked {code, label, path} candidates'). It also explicitly contrasts itself with resolve_product_code, so an agent can distinguish it from that sibling without opening either schema.

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?

It gives an explicit routing rule: prefer resolve_product_code for a one-call keyword-or-code helper, use this tool directly only when the raw ranked candidate list is wanted. That is a when-to-use plus an alternative, which is exactly what this dimension rewards.

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.

Resources