Skip to main content
Glama
FreightUtils MCP Server

FreightUtils MCP Server

Code List Lookup

code_list_lookup
Read-onlyIdempotent

Look up or search UK customs procedure and additional procedure codes in published HMRC code lists to read what a code means, its heading, status and list edition.

Instructions

Look up a code in a published code list. list (required) is one of: cds-procedure-codes-imports and cds-procedure-codes-exports (HMRC CDS requested and previous procedure codes, DE 1/10, e.g. 4000, 1040); cds-additional-procedure-codes-imports and cds-additional-procedure-codes-exports (HMRC CDS additional procedure codes, DE 1/11, e.g. C07, 1RV). With code it returns the code's name as published, the heading it is listed under, its status and the list's edition; with q it searches that one list (exact code, code prefix, then name); with neither, the list itself, paged. Use it to read what a UK customs procedure or additional procedure code means; for a commodity code use hs_code_lookup, for UK duty uk_duty_calculator. Codes and names as HMRC publishes them on GOV.UK (Open Government Licence v3.0, attribution in every answer). No completion rules and no declaration check; reference, not advice. Rate-limited: a limit error carries reset_at, the UTC time the allowance resets.

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": "code_list_lookup"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoSearch within the list: exact code first, then codes starting with q, then names containing it.
codeNoOne code, as published (e.g. 4000, C07). Leave out to search or to list.
fullNoFull rows (heading and edition on each) instead of summary rows, five per page by default.
listNoThe code list, e.g. cds-procedure-codes-imports (the lists are named in the description). Required: a lookup or a search runs within one list.
limitNoPage size: summary rows 1-200 (default 50), full rows 1-25 (default 5).
offsetNoPage start for a list or a search (default 0).
include_deprecatedNoAlso list and search codes the publisher marks as no longer to be used (a direct lookup always returns them, with the status). No list served today marks one.

Output Schema

NameRequiredDescriptionDefault
okYes
_metaNo
as_ofNo
resultYes
statusNo
_sourceYes
editionNo
citationYes
validityNo
warningsNo
confidenceYes
missing_inputsNo
blocking_errorsNo
envelope_versionYes
normalized_inputNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.34.6

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only cover the read-only/idempotent/closed-world safety profile; the description adds substantive behavior beyond that: rate limiting with a reset_at field on the error, Open Government Licence attribution in every answer, deprecated codes being returned by direct lookup but excluded from listing/search unless include_deprecated is set, and the three distinct response modes (code, q, neither).

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 the resource and the list enumeration, then the usage/alternative guidance, then caveats. It is one dense paragraph with heavily nested parentheticals that make the list enumeration slower to scan than a compact list would, but no sentence is filler.

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?

An output schema exists, yet the description still signals the shape of each mode (name, heading, status, edition), which helps an agent choose between code, q and neither. Combined with rate-limit behavior, licensing attribution and the reference-not-advice scope limit, nothing material is missing for a 7-parameter read-only lookup.

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 baseline is 3, but the description does real work the schema cannot: the schema only says 'e.g. cds-procedure-codes-imports (the lists are named in the description)', making the description the sole source of the valid list values, and it explains what code vs q vs neither each produce. It stops short of clarifying full, limit, offset and include_deprecated beyond what the schema already states.

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 and resource ('look up a code in a published code list') and then enumerates the actual lists by name with what each contains (DE 1/10 procedure codes vs DE 1/11 additional procedure codes) plus example values. It explicitly separates itself from siblings by naming hs_code_lookup for commodity codes and uk_duty_calculator for UK duty.

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?

Gives explicit when-to-use ('read what a UK customs procedure or additional procedure code means') and explicit alternatives with the condition that selects them ('for a commodity code use hs_code_lookup, for UK duty uk_duty_calculator'). It also sets boundaries on what the tool will not do ('No completion rules and no declaration check; reference, not advice').

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.