Skip to main content
Glama

TradeStats - customs trade statistics

get_new_markets

Partner countries that are new or surging for one product of one reporter, comparing the latest 12 months with the 12 months before. "new": the 12-month value is at least min_value (default 1,000,000 US dollars; never below 100,000) and the previous 12 months were lower and under 100,000 US dollars (no trade counts as 0). "surging": the 12-month value is at least min_value and grew +100% or more in US dollars (at least doubled), not counting the new ones. Each list is ordered by 12-month value, largest first; limit caps the rows of both lists together ("new" is filled first, then "surging"). Partners whose previous 12 months are unknown are in neither list. Use it for questions like "which countries started buying Japanese auto parts (8708)?" or "which markets are taking off?". For the whole partner ranking use get_partners (sort "growth"); for a one-call overview of a product use get_item_summary. Customs trade statistics of several reporting countries (Japan JP, United States US, United Kingdom GB, European Union (27 member states) EU) from their official customs data, monthly, by HS product code and partner country. value fields are in the reporter's currency (currency: JPY, USD, GBP or EUR) and _usd fields in US dollars; ratios and shares are fractions precomputed from the full dataset; every answer carries reporter, currency, data_through (latest published month), the reporter's attribution, and notes. Maximum 200 rows per answer. Numbers in answers are rounded once, at the end: amounts (value, _usd, v12 ...) to 2 decimals, quantity and kg to 3, unit prices (unit_price) to 4 significant digits below 100 and 2 decimals from 100 up (never rounded to 0), and ratios, shares and growth rates (yoy, mom*, share*, hhi*, chg3y) to 6; whole numbers and null are left as they are. A null quantity, kg or unit price comes with a *_unavailable_reason (mixed_units, weight_only, no_quantity_in_source, no_weight_in_source, source_gap, withheld; get_catalog lists them in null_reasons), and a missing seasonality with seasonality_unavailable_reason. The national level (JP 9-digit, US 10-digit, GB 8-digit, EU 8-digit codes) differs between reporters and between import and export; HS6, HS4 and HS2 are shared. Import and export are separate datasets, so reporter and flow are always required for product figures. Rankings (limit) are limited to the top 20 without an API key (more is refused with out_of_scope) and to 100 with a free API key. Start with get_catalog (coverage, your access limits, which tool to use) or, when you already know the code, get_item_summary for a one-call overview of a product.

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_new_markets"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesHS product code with 2, 4 or 6 digits, or the reporter's national code (JP 9 digits, US 10, GB 8, EU 8); dots are ignored (e.g. "85", "8507", "850760" or "8507.60"). National codes differ between reporters and between import and export; find codes with search_items. On a build that serves HS6 and above a national code without a series answers fine_digits_not_served: retry with its 6-digit parent.
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.
levelNoOptional. The level of the code: the reporter's national level (JP hs9, US hs10, GB cn8, EU cn8), hs6, hs4 or hs2; it follows from the number of digits, and a value that disagrees is rejected.
limitNoMaximum rows in total across the two lists, filled with "new" first, then "surging" (default 20). Without an API key the maximum is 20 (more is refused with out_of_scope); with a free API key 100.
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.
min_valueNoSmallest 12-month value in US dollars for a partner to be listed (default 1000000; for "new" it is never below 100000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / code / description
      Previous value: -"HS product code with 2, 4 or 6 digits, or the reporter's national code (JP 9 digits, US 10, GB 8; a reporter without a national level, such as EU, has HS6 as its finest level); dots are ignored (e.g. \"85\", \"8507\", \"850760\" or \"8507.60\"). National codes differ between reporters and between import and export; find codes with search_items. On a build that serves HS6 and above a national code without a series answers fine_digits_not_served: retry with its 6-digit parent."New value: +"HS product code with 2, 4 or 6 digits, or the reporter's national code (JP 9 digits, US 10, GB 8, EU 8); dots are ignored (e.g. \"85\", \"8507\", \"850760\" or \"8507.60\"). National codes differ between reporters and between import and export; find codes with search_items. On a build that serves HS6 and above a national code without a series answers fine_digits_not_served: retry with its 6-digit parent."
    • changedInput schema / properties / level / description
      Previous value: -"Optional. The level of the code: the reporter's national level (JP hs9, US hs10, GB cn8; EU has none), hs6, hs4 or hs2; it follows from the number of digits, and a value that disagrees is rejected."New value: +"Optional. The level of the code: the reporter's national level (JP hs9, US hs10, GB cn8, EU cn8), hs6, hs4 or hs2; it follows from the number of digits, and a value that disagrees is rejected."
  2. Changed2 schema fields changed
    • changedInput schema / properties / reporter / description
      Previous value: -"Required. The reporting country whose customs statistics are read: \"JP\" (Japan), \"US\" (United States) or \"GB\" (United Kingdom). Partners are the other countries."New value: +"Required. 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."
    • changedInput schema / properties / reporter / enum
      Previous value: -[
      -  "JP",
      -  "US",
      -  "GB"
      -]New value: +[
      +  "JP",
      +  "US",
      +  "GB",
      +  "EU"
      +]
  3. Changed2 schema fields changed
    • changedInput schema / properties / reporter / description
      Previous value: -"Required. The reporting country whose customs statistics are read: \"JP\" (Japan) or \"GB\" (United Kingdom). Partners are the other countries."New value: +"Required. The reporting country whose customs statistics are read: \"JP\" (Japan), \"US\" (United States) or \"GB\" (United Kingdom). Partners are the other countries."
    • changedInput schema / properties / reporter / enum
      Previous value: -[
      -  "JP",
      -  "GB"
      -]New value: +[
      +  "JP",
      +  "US",
      +  "GB"
      +]
  4. Changed2 schema fields changed
    • changedInput schema / properties / reporter / description
      Previous value: -"Required. 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."New value: +"Required. The reporting country whose customs statistics are read: \"JP\" (Japan) or \"GB\" (United Kingdom). Partners are the other countries."
    • changedInput schema / properties / reporter / enum
      Previous value: -[
      -  "JP",
      -  "US",
      -  "GB",
      -  "EU"
      -]New value: +[
      +  "JP",
      +  "GB"
      +]
  5. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description fully carries the behavioral burden: it defines the exact 'new' and 'surging' criteria, explains ordering and how limit is filled, excludes partners with unknown prior data, and discloses API-key row limits plus null and rounding behavior. This is enough for an agent to understand how the tool selects and returns data.

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 description is front-loaded with the purpose and exact inclusion rules, then moves through usage, data caveats, limits, and alternatives in a logical order. It is long, but most sentences add relevant operational context rather than repeating the schema.

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?

For a six-parameter analytical tool with no output schema and no annotations, the definition is unusually complete: it covers data sources, currencies, row caps, API-key limits, rounding, null reasons, national-code caveats, and sibling routing. Nothing essential for correct selection or invocation appears missing.

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?

The input schema has 100% description coverage for all six parameters, including the min_value floor and limit fill order. The description reinforces the selection logic but adds little parameter-specific meaning beyond what the schema already states, so the high-coverage baseline of 3 applies.

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 description states a specific resource and scope: partner countries that are new or surging for one product of one reporter, comparing the latest 12 months with the prior 12 months. It also explicitly distinguishes this from get_partners for full partner rankings and get_item_summary for a product overview.

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 concrete question examples ('which countries started buying Japanese auto parts (8708)?') and names the alternatives to use for different needs. It also points the agent to get_catalog or get_item_summary as starting points when appropriate.

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