Skip to main content
Glama

comtrade_get_metadata

Read-onlyIdempotent

Retrieves UN Comtrade publication notes for a reporter's datasets, showing publication dates, currency, conversion factors, trade system, valuation and partner attribution per revision.

Instructions

List UN Comtrade's publication notes for a reporter's datasets, one per publication.

Upstream's getMetadata: per dataset (reporter and period), a note for its first publication ("New Data") and one for each revision ("Revised Data"), each with its publication_date and what the reporter's data rests on: currency, the import and export conversion factors (Decimal), trade_system ("General" or "Special"), the valuation ("CIF", "FOB") and partner attribution. One call. reporter_code and period are not in upstream's spec, but upstream honours them as the official comtradeapicall package sends them; without reporter_code the answer holds every reporter's notes, so name one.

Args: type_code: "C" goods or "S" services. freq_code: "A" annual or "M" monthly. cl_code: Classification: "HS" ("H6" is answered the same), SITC "SS" or "S1" to "S4", "BE", "TM", for services "EB", "EB02", "EB10". reporter_code: Reporters, comma-separated, as list_reporters lists them: "757" Switzerland (38 annual datasets, 1988 onwards), "842" USA, "276" Germany, "156" China. period: Years "2023" or months "202305", comma-separated. Omit for every period.

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": {
      "type_code": "<type_code>",
      "freq_code": "<freq_code>",
      "cl_code": "<cl_code>"
    },
    "name": "comtrade_get_metadata"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodNo
cl_codeYes
freq_codeYes
type_codeYes
reporter_codeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, open-world and non-destructive, so the safety profile is covered. The description adds real behavioral context beyond that: it explains the two note types ('New Data' and 'Revised Data' per revision), the fields each note carries, that reporter_code/period are honored by upstream despite being outside its spec, and the cost of omitting reporter_code. It does not discuss response size or any rate limits, so it falls 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?

The core purpose is front-loaded in the first sentence, followed by useful upstream detail and a clean Args block. Some wording is padded, particularly the discussion of what upstream's spec does and does not contain, but no section is genuinely wasted.

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 no output schema, the description correctly compensates by enumerating the note fields an agent will receive. Combined with full parameter documentation, an agent can call this correctly; only the absence of any volume or limit guidance keeps it from a 5.

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 description coverage is 0%, so the description must carry the full burden, and it does: it documents all five parameters with concrete values for type_code, freq_code and cl_code (including the 'H6' alias and SITC/EB variants), example reporter codes, and the period string formats plus the omit-to-get-everything behavior.

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?

Opens with a specific verb and resource: 'List UN Comtrade's publication notes for a reporter's datasets, one per publication.' That clearly separates it from the data-returning siblings (get_data, get_bilateral_flows) without naming any of them explicitly. It stops short of a 5 because the differentiation is implicit rather than stated as an exclusion.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Offers concrete operational guidance on two parameters: 'without reporter_code the answer holds every reporter's notes, so name one' and 'Omit for every period.' However, it never states when to call this tool instead of a sibling such as comtrade_get_comtrade_releases or comtrade_get_data, leaving the workflow decision to inference.

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