Skip to main content
Glama

TradeStats - customs trade statistics

get_mirror_estimate

Estimate of one country's trade for a product from the records of the reporting countries that trade with it: for a target such as CN (China), flow "import" sums the reporters' exports to the target (what the target bought from them) and flow "export" sums the reporters' imports from the target, over the same 12 months ending at the latest month every reporter used has published, in US dollars. Use it for a country whose own customs statistics are not available here. Returns the estimate, each reporter's value and share, the previous 12 months and year-over-year change, which reporters were used or had no figure (never counted as 0) and notes. It is an estimate, not a published figure: it covers only the reporting countries listed (the rest of the target's trade is not in it), exports are FOB and imports CIF, goods routed through trading hubs such as Hong Kong are recorded under the hub, and precious metals (HS 71) can differ enormously between the two sides. Available at HS6, HS4 and HS2 only. For the two records of trade between two reporting countries use get_mirror_trade instead.

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": {
      "target": "<target>",
      "code": "<code>",
      "flow": "<flow>"
    },
    "name": "get_mirror_estimate"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesHS product code with 2, 4 or 6 digits (e.g. "85", "8708" or "850760"; dots are ignored). National codes are rejected.
flowYesRequired. The target's direction: "import" (the target's imports, estimated from the reporters' exports to it) or "export" (the target's exports, estimated from the reporters' imports from it).
targetYesRequired. ISO 3166 alpha-2 code of the country whose trade is estimated (e.g. "CN", "VN", "IN"). It may itself be a reporter; it is then left out of its own reporters.
reportersNoOptional. Reporting countries to use, one or more of "JP", "US", "GB" or "EU" (a comma-separated list in a query string). Default: every available reporter except the target.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: it discloses the alignment window (12 months ending at the latest common published month), that non-reporters are excluded from the total, that missing figures are never treated as 0, FOB vs CIF asymmetry, hub routing (e.g. Hong Kong), HS 71 distortion risk, and the HS6/HS4/HS2 granularity limit. It also explicitly frames the result as an estimate rather than a published figure.

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 and the alternative routing are front-loaded, and the long caveat sentence is dense with non-redundant information. It is still a single heavy block and repeats some flow semantics already present in the schema, so it is efficient but not maximally tight.

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 by enumerating the return contents (estimate, per-reporter value and share, prior 12 months, year-over-year change, reporter usage status, notes). Given four parameters and an estimation methodology, nothing an agent needs to interpret or invoke the tool correctly 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 baseline is 3, but the description adds real meaning beyond the schema by defining what flow='import' and flow='export' sum at the reporter level and by specifying the shared 12-month reference window. It also notes that reporters excludes the target when the target is itself a reporter, which sharpens the default behavior.

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?

The first sentence names a specific verb (estimate) and resource (one country's trade for a product) and states the method: derived from reporting countries' records. It explicitly distinguishes itself from the sibling get_mirror_trade, so an agent can pick correctly 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?

It gives an explicit trigger ('Use it for a country whose own customs statistics are not available here') and an explicit exclusion routing to an alternative ('For the two records of trade between two reporting countries use get_mirror_trade instead'). Both when-to-use and when-not-to-use are covered.

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