Skip to main content
Glama

get_port_congestion_risk

[INFERENCE TOOL] Calculate Port Congestion Index (PCI, 0-100 composite score).

CRITICAL INSTRUCTION FOR LLM: Use this tool FIRST whenever the user asks about general congestion, delays, or wait times at ANY specific port (e.g., SGSIN, BRSSZ). Do not guess delays; call this tool.

PCI = (Congestion Level × 0.4) + (Avg Delay × 0.3) + (Vessel Queue × 0.2) + (Berth Use × 0.1).
Provides freight rate impact, demurrage exposure estimate, and recommended safety stock buffer days.

Args:
    port_id: UN/LOCODE e.g. "BRSSZ" (Santos), "SGSIN" (Singapore), "NLRTM" (Rotterdam).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
port_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does so well: it labels the tool as an INFERENCE TOOL, exposes the PCI formula and weights, and states that it provides freight rate impact, demurrage exposure, and safety stock buffer days. It stops short of explicitly declaring read-only status or data freshness/limitations, so a 5 is not warranted.

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 front-loaded with purpose and the critical usage instruction, then adds the formula and output context. The formula and output list are relevant, but the all-caps instruction and formula make it longer than strictly necessary; it remains readable and well-structured.

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?

For a composite risk inference tool with no annotations and one required parameter, the description covers purpose, usage, calculation logic, expected output context, and parameter format. An output schema exists, so return-value details need not be exhaustively described, and nothing essential is missing.

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?

The schema provides 0% description coverage for the single port_id parameter, so the description must compensate fully. It does: it defines the format as UN/LOCODE and gives concrete examples such as BRSSZ, SGSIN, and NLRTM.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb (Calculate) and resource (Port Congestion Index, PCI) with its 0-100 composite scale. It does not explicitly differentiate from siblings such as get_pci_index or get_port_risk, but it does scope the purpose to general congestion, delays, and wait times at a specific port.

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?

It gives a strong, explicit usage directive: use this tool FIRST whenever the user asks about general congestion, delays, or wait times at any specific port, and do not guess delays. It lacks named alternatives or when-not-to-use guidance, which would be needed for a 5.

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.