Skip to main content
Glama

TradeStats - customs trade statistics

get_drilldown

Which child items drove the change of an HS2, HS4 or HS6 item: for the month you name (default the latest) compared with the same month a year earlier (compare "yoy") or the month before ("mom"), each child gets its value, the earlier value, the change and its contribution to the parent's change (change divided by the parent's change), largest absolute change first. Children are the next level down (HS2 to HS4, HS4 to HS6, HS6 to national codes). If an item has no children, rows is empty with a note; if the parent did not change, contribution is null. Works for every reporter. Use it for finding which products drove a change in a chapter, heading or subheading.

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

Input Schema

NameRequiredDescriptionDefault
codeYesRequired. HS code of 2, 4 or 6 digits; dots are ignored.
flowYesRequired. "import" (goods entering the reporting country) or "export" (goods leaving it); there is no combined view: "both" does not exist. For a comparison across countries use compare_countries, for exports minus imports use get_balance.
limitNoOptional. Children shown (default 20).
monthNoOptional. The month to explain, YYYY-MM. Default: the latest published month.
compareNoOptional. "yoy" (default) compares with the same month a year earlier; "mom" with the month before.
reporterYesRequired. The reporting country whose customs statistics are read: "JP" (Japan), "US" (United States), "GB" (United Kingdom) or "EU" (European Union (27 member states)). Partners are the other countries.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/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 substantial work: it discloses the row ordering ('largest absolute change first'), the contribution formula, and two edge cases (no children yields empty rows with a note; unchanged parent yields null contribution). It does not describe truncation behavior when the child count exceeds the limit, which matters for interpreting completeness of results.

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 the core question, then mechanics, then edge cases, then a usage cue — a sensible order with no filler sentences. It is long and comma-chained in places ('each child gets its value, the earlier value, the change and its contribution...'), which slightly impedes scanning but does not waste words.

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?

For a six-parameter analysis tool with no output schema, the description covers what a row contains, how rows are ordered, and the two degenerate cases, which is nearly everything an agent needs to call and interpret it. The remaining gap is behavior under the limit (whether children are truncated or ranked-then-cut).

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 every parameter is already documented, including defaults for month, compare and limit. The description restates the month default and the yoy/mom meaning and adds the useful framing that children are the next HS level down, but it adds no new semantics for limit or reporter beyond the schema. Baseline 3 is appropriate.

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?

Names a specific verb and resource: 'Which child items drove the change of an HS2, HS4 or HS6 item', and defines the scope (one level down, per child) precisely. An agent can distinguish this from generic series or summary tools without opening the schema.

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?

The closing sentence gives a concrete use case ('finding which products drove a change in a chapter, heading or subheading'), and the description states the default comparison so an agent knows the baseline behavior. It does not name a sibling to prefer when the question is about decomposition across a whole portfolio or a single item's history, so routing must still be inferred.

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