Skip to main content
Glama
SoapyRED

FreightUtils MCP Server

unlocode_lookup

Read-onlyIdempotent

Look up UN/LOCODE transport locations by exact code or name query, filtered by country and function, and retrieve comprehensive location details.

Instructions

Search 116,129 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 2024-2) — 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
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint. Description adds: exact hits provenance-based, fuzzy hits match quality via confidence, unknown code errors, rate limit behavior with 429 error details. No contradictions.

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?

Description is detailed but well-structured with clear sections (code input, query, behavior, returns, limitations, related). Could be slightly more concise, but every sentence adds value.

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 5 params, no output schema provided in input but description covers return fields (code, name, coordinates, etc.), behavior (rate limits, error handling), limitations, and related tools. Complete for agent use.

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

Parameters5/5

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

Schema coverage 100%. Description adds meaning: code pattern examples, query min length, function_type enum values explained, limit defaults, and examples for each parameter.

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?

Description states the tool searches UN/LOCODE transport locations worldwide, lists specific location types (ports, airports, etc.), explains code format, and distinguishes from siblings like airport_lookup and nearest_airport.

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?

Explicitly explains when to use exact code vs name query, optional narrowing by country and function_type, mentions rate limits and 429 retry, suggests get_subscribe_link for higher limits, and references sibling tools for specific needs.

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

Install Server

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