Skip to main content
Glama

Trustbase Lab · Trusted Data Infrastructure for the AI Era

Search Bilateral Trade Flows

query_trade_flows
Read-onlyIdempotent

Purpose: query global carbon black (HS 280300) bilateral trade flows from UN Comtrade official customs statistics - 1751 records, 8 reporters (CHN/USA/DEU/JPN/KOR/IND/THA/TUR) plus World totals, 2024-2025. Guidelines: pass reporter (ISO3 alpha), partner (ISO3/numeric/name), period (YYYY), flow (X=export/M=import) and limit; unit_price_usd_t and share_pct are derived fields (share excludes World); use for capacity shift, trade-partner concentration and price-gap structure analysis. Limits: customs-reported data only - no commercial quote platforms; unit prices with qty missing are flagged 'missing_qty'; guardrail band 300-8000 USD/t. Ex: 'China carbon black exports 2025', 'top US import partners HS 280300'.

Input Schema

NameRequiredDescriptionDefault
flowNo流向 X=出口 / M=进口
limitNo返回条数上限(默认 20,最大 200)
offsetNo起始偏移,默认 0;返回体 has_more=true 时用 next_cursor 作为下一页 offset
periodNo期间 YYYY(如 2024),留空取全部
partnerNo伙伴国筛选:ISO3/数字代码/中文名(部分支持),如 THA/764/泰国
reporterNo报告国 ISO3 字母码,如 CHN/USA/DEU/JPN/KOR/IND/THA/TUR
response_formatNoOutput format: 'markdown' (default, human-readable) or 'json' (machine-readable).markdown

Output Schema

NameRequiredDescriptionDefault
textYesHuman-readable result (markdown, or a JSON string when response_format=json).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "起始偏移,默认 0;返回体 has_more=true 时用 next_cursor 作为下一页 offset",
      +  "type": "integer"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / response_format / description
      Added value: +"Output format: 'markdown' (default, human-readable) or 'json' (machine-readable)."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "text": {
      +      "description": "Human-readable result (markdown, or a JSON string when response_format=json).",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "text"
      +  ],
      +  "type": "object"
      +}
  3. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare the safe read profile, and the description layers on real behavioral detail: derived fields (unit_price_usd_t, share_pct with World excluded), the 'missing_qty' flag for unreliable unit prices, and a plausibility guardrail band of 300-8000 USD/t. It does not discuss pagination semantics, though offset/next_cursor are documented in the schema.

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 labeled Purpose/Guidelines/Limits/Ex sections and concrete example queries, so an agent can scan it quickly. It is dense and somewhat run-on, but almost every clause carries operational information.

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?

Given an existing output schema, the description need not explain return shapes; instead it supplies the dataset scope, reporter coverage, date range, derived-field caveats and guardrails an agent needs to call and trust the tool. Nothing material is 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?

Schema coverage is 100%, so every parameter is already documented in the schema; the description largely restates reporter/partner/period/flow/limit formats. It adds only marginal value, notably the note that share_pct excludes World, which helps interpret filtering rather than a parameter.

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?

States a specific verb and resource (query bilateral carbon black HS 280300 trade flows) plus the data source (UN Comtrade), coverage (1751 records, 8 reporters + World, 2024-2025). This clearly separates it from siblings like get_trade_flow_summary and get_trade_partner_ranking.

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?

Explicitly names the analysis contexts it serves (capacity shift, trade-partner concentration, price-gap structure) and draws a boundary ('customs-reported data only - no commercial quote platforms'). It stops short of naming which sibling summaries/rankings to use instead for aggregate views.

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