Skip to main content
Glama
SoapyRED

FreightUtils MCP Server

resolve_reference

Read-onlyIdempotent

Resolve any freight identifier into typed, cited candidates. Unsure which lookup tool fits? Pass one opaque string to get ranked matches and follow the right resource.

Instructions

Resolve an arbitrary freight identifier — one opaque string in, typed and cited candidates out. The agent front door: when you hold an identifier-ish token ("176", "UN1845", "NLRTM", "FOB", "22G1", "MSKU1100810", "D/E") and do not know which lookup tool fits, call this FIRST and follow the candidate's api_url / canonical_url (or the matching sibling tool) for depth.

Provide q: ONE identifier (single token, max 32 chars). Thirteen grammars all run — UN numbers, AWB prefixes, airline IATA/ICAO, airport IATA/ICAO, UN/LOCODE, ISO 6346 container numbers (check digit computed), HS codes (6-10 digits; national lines resolve at their 6-digit international parent), Incoterms, ADR tunnel codes, ULD serials, ISO container size/type codes. Ambiguity is the product: colliding grammars return MULTIPLE ranked candidates ("LHR" is Heathrow AND an Egyptian carrier's ICAO), never a silent guess.

Behavior: deterministic — normalize (trim, uppercase, collapse spaces/dashes, strip a UN prefix), match ALL grammars, rank by record-hit > verification status > static dataset prior (airlines/adr/unlocode first) > stable tiebreak; every candidate carries rank_basis so the ordering is inspectable. Zero candidates is a VALID result (count 0 + note), never an error. A failed container check digit returns a candidate with valid:false rather than dropping it. Rate-limited (anonymous use: 25 requests/day per IP): a 429 error body carries retry_after_seconds and a Retry-After header — back off and retry, or call get_subscribe_link for higher limits.

Returns: query, normalized, count and candidates[] — each with entity_type, identifier_type, value_normalized, summary, record (the core fields the matching dataset holds), verification_status + verification_basis, rank_basis, canonical_url, api_url and a per-candidate dataset citation — under result, plus confidence, _source and citation (the FreightUtils v1 response envelope).

Limitations: v1 is SINGLE-TOKEN resolution, not free-text extraction — pass one identifier, not a manifest line; SCAC/BIC codes are not yet covered; a match asserts the identifier is known/well-formed, not that a shipment exists.

Related: every lookup tool this resolves into — adr_lookup, airline_lookup, airport_lookup, unlocode_lookup, hs_code_lookup, incoterms_lookup, container_lookup, uld_lookup, validate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesOne freight identifier — e.g. "176", "UN1845", "NLRTM", "FOB", "LHR", "22G1", "MSKU1100810", "090111", "AKE12345AB", "D/E".

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
resultYes
_sourceYes
citationYes
validityNo
warningsNo
confidenceYes
blocking_errorsNo
envelope_versionYes
normalized_inputNo
Install Server

TDQS

A4.8/5.0
Behavior5/5

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

Although annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, the description adds rich behavioral detail: deterministic normalization, exhaustive grammar matching, ranked candidates with inspectable basis, a valid zero-result case, failed check-digit handling, and rate-limit behavior with 429 + retry_after_seconds. This substantially exceeds the minimal safety profile provided by annotations and informs the agent about edge cases, ordering, and failure modes.

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 description is longer than most, but almost every sentence carries functional content, and the first section immediately communicates the tool's role. It is front-loaded with the use case and then proceeds methodically through behavior, return data, and limitations. The response-schema field enumeration is somewhat redundant with the output schema, but in a complex multi-format tool that redundancy helps the agent mentally map results.

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 tool's high complexity (thirteen grammars, ranking, rate limiting, output envelope) and the rich input/output schemas, the description is exceptionally complete. It explains what the result list contains, how to interpret zero results and invalid check digits, what happens under rate limiting, and which sibling tools to route to for depth. Nothing an agent needs to make a correct call or interpret the output 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 description coverage for q is 100%, so the baseline is 3. The description goes beyond the schema by clarifying q must be a single token (max 32 chars), not free text or a manifest line, and by giving identity context (normalization strips prefixes, colliding grammars produce multiple candidates). This adds important semantic nuance about granularity and ambiguity that is not present in the schema alone.

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 opens with a precise verb and resource: "Resolve an arbitrary freight identifier — one opaque string in, typed and cited candidates out." It immediately distinguishes itself from the many sibling lookup tools by framing itself as the agent front door for ambiguous identifier tokens, and reinforces this with a long list of identifier examples. This is a specific, actionable purpose that an agent can reliably select on.

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?

The description explicitly states when to use the tool: "call this FIRST" when holding an identifier-ish token and not knowing which lookup tool fits, and then "follow the candidate's api_url / canonical_url (or the matching sibling tool) for depth." It also gives true exclusions — single-token only, not free-text, SCAC/BIC not covered — and lists the resolved sibling tools, so an agent receives both inclusion and exclusion criteria.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SoapyRED/freightutils-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server