Skip to main content
Glama

Get shipment KPIs

get_kpis
Read-onlyIdempotent

The organization's shipment statistics for a period, already counted: the same figures as the Statistics page. Use it for "how many containers arrived late this month", "what share of arrivals were on time this quarter", "how many incidents per supplier" or "which forwarder is most often late", instead of paging through search_shipments. The last 30 days by default; from and to are dates, at most 24 months back, and a to after today is read as today. A shipment counts in the period it was created in, archived ones included. Returns shipments (total, ocean, air, road), arrivals against the original ETA (measured are the ones the carrier confirmed; on time means not later than planned, then up to 5 days late and over 5 days late), incidents (delay over 2 days, rollover, free-time breach, document error, customs hold) with the rate per 100 shipments, CO2 in tonnes, and a monthly series whose first and last months may be partial. group_by adds a breakdown: carrier, forwarder or supplier (shipments, arrivals and incidents each, the 25 with most shipments), lane (arrivals, the 25 with most), or destination_port (days in port between discharge and gate out, containers still there counted up to today, the 10 ports with most containers). Narrow to one supplier or forwarder with its id from list_companies, or to one transport type. Quote the numbers as returned, with the period and filters in period and filters.

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

Input Schema

NameRequiredDescriptionDefault
toNoLast day, included, an ISO 8601 date. Default and latest: today.
fromNoFirst day, an ISO 8601 date such as "2026-10-01". Default: 29 days before `to`.
group_byNoAdd one breakdown. Omit for totals only.
supplierNoOnly this supplier's shipments: a company id such as "cmp_12", from list_companies.
forwarderNoOnly shipments handled by this forwarder: a company id such as "cmp_12", from list_companies.
transport_typeNoOnly ocean, air or road shipments.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), yet the description adds substantial behavior: counting is by created date with archived shipments included, `to` after today is clamped to today, a 24-month history limit, partial first/last months in the series, and breakdown caps (25 carriers/forwarders/suppliers, 25 lanes, 10 ports) with in-port containers counted up to today. It stops short of noting pagination/size or latency, but that is minor for a read-only aggregate.

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 purpose and usage, then periods, then return shape, then parameters — a logical order with no filler. It is a single very dense paragraph, though, and the metric definitions (on-time bands, incident types) could be split for scanability.

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?

There is no output schema, and the description compensates fully: it enumerates every returned metric (shipment totals by mode, arrivals vs original ETA with the on-time/≤5-day/>5-day bands, incident types with rate per 100, CO2 tonnes, monthly series), plus the group_by breakdown contents and guidance to quote numbers with `period` and `filters`. Nothing material for correct invocation 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 coverage is 100%, so the schema baseline is 3; the description goes beyond it by adding the 24-month lookback, the clamp of `to` to today, the definition of each group_by breakdown (what is measured, which dimension caps at 25 or 10), and the instruction to source supplier/forwarder ids from list_companies. Only the exact date format and defaults are left to the schema.

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 resource (the organization's shipment statistics for a period, already counted, matching the Statistics page) and a specific operation. It explicitly contrasts with search_shipments ("instead of paging through"), so an agent can distinguish it from the sibling list/search tools without opening a schema.

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 concrete example questions the tool answers (late containers this month, on-time share this quarter, incidents per supplier, latest forwarder) and names the alternative it replaces. It also states the alternative filtering path implicitly: narrow to one supplier/forwarder or transport type rather than paging shipments.

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.

Resources