Skip to main content
Glama
SoapyRED

FreightUtils MCP Server

unlocode_lookup

Read-onlyIdempotent

Search UN/LOCODE transport locations worldwide—ports, airports, rail and road terminals—by exact code or name, with country and function filters.

Instructions

Search 116,232 UN/LOCODE transport locations worldwide — ports, airports, rail and road terminals, inland container depots and border crossings. Codes are 5 characters: a 2-letter ISO country code + a 3-character location code (GBLHR = London Heathrow, NLRTM = Rotterdam).

Provide code for an exact record, or query (name search, min 2 chars) optionally narrowed by country and function_type; limit caps results (default 20, max 100).

Behavior: read-only; exact code hits are provenance-based while fuzzy name hits report match quality via the envelope's confidence (basis match_quality); an unknown code errors with a not-found message. 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: the location record(s) — code, name and name_ascii, country, subdivision, functions[], status, coordinates {lat, lon} and iata_code where assigned — under result, plus confidence, _source and citation (the FreightUtils v1 response envelope).

Limitations: an administrative code list (UNECE UN/LOCODE 2025-1) — confirm operational status and coordinates with the port or authority before critical use.

Related: airport_lookup (airport-specific records including ICAO codes), nearest_airport (find airports by coordinates).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoExact UN/LOCODE — 5 characters. Examples: "GBLHR", "NLRTM".
limitNoMaximum results. Default: 20, max: 100.
queryNoLocation name search (min 2 chars). Examples: "rotterdam", "heathrow".
countryNoFilter by 2-letter ISO country code. Examples: "GB", "NL".
function_typeNoFilter by location function.

Output Schema

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

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the behavioral paragraph adds meaningful context: exact code hits are provenance-based, fuzzy name hits expose confidence via match quality, unknown codes produce not-ound, and 429 response carries retry_after seconds and Retry-After header. This is exactly the extra behavior information an agent needs beyond annotations. No contradiction with annotations.

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 front-loaded with a precise one-line summary, then proceeds into code structure, usage modes and behavior. No sentence is wasted; even the 429/back-off detail earns its place because it is operational guidance an agent would otherwise lack. The length is justified by six-dimensional as in this is a complex tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers input options, return content, error behavior, rate limits, retry instructions, and alternatives for higher limits. The only meaningful gap is what happens when no parameters are provided: all schema properties are optional, but the description implies a code or query should be passed. That edge case is not resolved.

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?

Input schema has 100% description coverage, so the schema carries most of the meaning. The description adds value by framing code vs. query as two modes and noting that country/function_type optionally narrow the name query. That is useful relational/parametric semantics. The examples slightly duplicate schema examples, so not quite max.

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-resource pair: 'Search 116,232 UN/LOCODE transport locations worldwide' and enumerates the exact set of location categories. It anchors the resource with the 5-character code structure and true examples (GBLHR, NLRTM), so there is no ambiguity against sibling lookup tools like airport_lookup or container_lookup.

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 clear usage modes: provide code for exact record, or name query (min 2 chars) with country/function filters, and states limit caps/default. It also directs the agent to get_subscribble_link on rate-limit, which is useful alternative guidance. It does not explicitly contrast with sibling lookup tools, but the UNLOCODE-specific search conditions are clear.

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