Skip to main content
Glama

Primary Source Commodities

Trading Partners Ranked

trade.partners
Read-onlyIdempotent

Every country one reporter traded a commodity with in a year, ranked by value, each with the implied unit value it paid or received. Use for 'where does Ghana sell its cocoa and at what price to each buyer' and for comparing prices across markets. Pass the reporter as ISO alpha-3 (GHA, IND). Annual data. Completeness is verifiable for this shape: the response says whether the partner rows reconcile with the upstream's own World total.

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": {
      "commodity": "<commodity>",
      "reporter": "<reporter>",
      "year": "<year>"
    },
    "name": "trade.partners"
  }
}

Input Schema

NameRequiredDescriptionDefault
flowNoDirection from the reporter's view.
yearYesFour-digit year. Example: 2023.
limitNoMaximum rows returned, 1-200 (default 25).
reporterYesReporting country, ISO alpha-3 preferred. Example: GHA.
commodityYesInstrument code with an HS heading. Example: CC for cocoa.

Output Schema

NameRequiredDescriptionDefault
flowNo
yearYes
notesYesCaveats the numbers cannot carry. Read these before presenting a unit value.
sourceNo
completeNoWhether the partner rows reconcile with the upstream's World total
partnersYesPartners, highest value first
reporterYes
returnedNo
commodityYes
license_tagNo
partner_countNoPartners the upstream returned, before any limit
shortfall_usdNo
world_total_usdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already establish a safe, idempotent, closed-world read, so the description's job is narrower. It adds real value by disclosing annual data granularity and that the response self-reports whether partner rows reconcile against the upstream World total, which tells the agent how to judge result completeness. Ordering tie-breaking and behavior with no 'flow' remain undisclosed.

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?

Three tight sentences: what it returns, when to use it, then format and data caveats. The scoping statement is front-loaded and nothing is padding. Minor redundancy between 'implied unit value it paid or received' and 'comparing prices across markets'.

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?

An output schema exists, so return shape needn't be explained, and the description covers scope, format expectations, granularity, and a validation signal. The only material gap is the optional 'flow' parameter's default/aggregation behavior, which neither schema nor description resolves.

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

Parameters3/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 reinforces reporter format (ISO alpha-3 with GHA/IND examples) and the annual granularity of 'year', but this largely duplicates schema text. It does not clarify what happens when the optional 'flow' is omitted, which is the one genuinely ambiguous parameter.

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 first sentence names a specific resource and scope: partner countries for one reporter/commodity/year, ranked by value, each carrying an implied unit value. That is far more than a restatement of the name. It stops short of naming a sibling (e.g. trade.ranking or trade.flow) to distinguish itself from, so an agent must infer the boundary.

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?

Concrete usage context is given with a worked example query ('where does Ghana sell its cocoa and at what price to each buyer') plus the secondary case of comparing prices across markets. There are no explicit exclusions or named alternatives, so guidance is clear but not fully routing.

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