Skip to main content
Glama

un-comtrade-mcp-server

Get Top Goods Reporters

comtrade_get_top_reporters
Read-only

Rank retrieved reporting areas by reported import or export value for one goods code and period. Partner 0 (World) ranks reporters by their trade with all partners. Use a bilateral partner to rank reporters by their trade with that area. Shares use the retrieved reporting areas before the display limit. Use comtrade_get_top_partners to rank the partners of one reporter.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "flow_code": "<flow_code>",
      "period": "<period>"
    },
    "name": "comtrade_get_top_reporters"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum reporting areas displayed. Totals cover all eligible retrieved reporting areas.
periodYesOne annual YYYY or monthly YYYYMM period. Frequency is inferred.
cmd_codeNoOne commodity code in the selected HS or SITC classification. Omit or pass TOTAL for total merchandise trade.
flow_codeYesTrade flow: M=imports, X=exports.
partner_codeNoM49 partner code (0–999). Defaults to World (0).
classificationNoGoods classification: HS as reported, H0–H6 with authenticated access, or SITC S1–S4/SS.HS

Output Schema

NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
periodNoPeriod queried.
cmdCodeNoCommodity code queried (TOTAL when omitted).
flowCodeNoFlow direction queried.
reportersNoRetrieved reporting areas sorted by descending known value, then code, with unresolved values last.
truncatedNoTrue when the upstream retrieval may be incomplete due to a detected limit or failed slice. Independent of the display limit.
partnerCodeNoPartner code queried (0 = World).
totalValueUsdNoSum in USD across eligible retrieved reporting areas before the display limit, whether or not retrieval was capped. Omitted for an empty set or any unresolved value.
classificationNoGoods classification queried.
coverageNoticeNoScope of the retrieved data and any conditions that prevent ranking.
totalReportersNoEligible retrieved reporting areas before the display limit.
referenceNoticeNoReference descriptions unavailable; trade values retained.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds non-obvious behavior beyond annotations: only *retrieved* reporting areas are ranked and shares are computed over that retrieved set before the display limit applies — a real caveat for interpreting results. It does not mention authenticated-access constraints or rate limits, keeping it short of a 5.

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?

Four tight sentences: purpose first, then partner semantics, then the limit/share nuance, then sibling routing. Nothing repeats the schema and nothing is wasted, though the share/limit sentence is dense enough to read twice.

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?

With an output schema present, return-value explanation is unnecessary, and required parameters plus flow/period semantics are covered. The main residual gap is classification handling (HS vs H0–H6 authenticated access) and any data-availability caveats before ranking, which live only in the schema.

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 baseline is 3. The description goes further by explaining what partner_code=0 actually means behaviorally (trade with all partners) and that limit affects display only, not the share denominator — meaning the schema alone does not convey.

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 verb and resource ('Rank retrieved reporting areas') scoped to 'one goods code and period', and immediately clarifies what is being ranked (import/export value). The final sentence distinguishes it from the sibling comtrade_get_top_partners, so an agent can route without opening either 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?

Explicitly explains the two usage modes: partner 0 (World) ranks reporters by trade with all partners, while a bilateral partner ranks reporters by trade with that specific area. It also names the alternative tool and the condition that selects it ('to rank the partners of one reporter').

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.