Skip to main content
Glama

Br Trade Flows

br_trade_flows
Read-onlyIdempotent

Brazil exports/imports over a date range, from MDIC Comex Stat, Brazil's own customs trade statistics, PROXIED LIVE (not a bulk copy). Monthly granularity at NCM8 (Brazil's 8-digit national tariff code, finer than the HS6 that UN Comtrade reports for Brazil), with an optional breakdown by Brazilian state of origin/destination, a dimension Comtrade does not have. Filter by a specific NCM product code, an NCM/HS chapter (2-digit), a partner country, and/or a Brazilian state; any combination, or none (totals). Returns value in USD FOB and net weight in kg, with every code resolved to its name. Use for "Brazil's soybean exports to China by month in 2025" (ncm="12019000", country="China", from="2025-01", to="2025-12") or "Mato Grosso's exports in Q1 2025" (state="MT", from="2025-01", to="2025-03").

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "to": "2025-12",
      "ncm": "12019000",
      "flow": "export",
      "from": "2025-01",
      "country": "China"
    },
    "name": "br_trade_flows"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesEnd of period: "YYYY" or "YYYY-MM" (e.g. "2025" or "2025-12"). Inclusive.
ncmNoFull 8-digit NCM product code (e.g. "12019000" = soybeans, other than for sowing). Omit for all products.
flowNoTrade direction: "export" or "import". Defaults to "export".
fromYesStart of period: "YYYY" or "YYYY-MM" (e.g. "2025" or "2025-01").
stateNoBrazilian state name or two-letter UF abbreviation (e.g. "Mato Grosso" or "MT"). Omit for all of Brazil.
chapterNo2-digit NCM/HS chapter code (e.g. "12" = oilseeds and grains, "27" = mineral fuels/oils). Omit for all chapters. Use this OR ncm, not both.
countryNoPartner country name (e.g. "China", "United States") or Comex Stat country id. Omit for all countries (world total).
monthlyNotrue (default) returns one row per month; false collapses the whole period into a single total.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the bar is lower, yet the description adds real context: the data is proxied live rather than a bulk copy, it is monthly granularity, and returns include USD FOB value, net weight in kg, and resolved code names. That is substantive behavioral disclosure beyond the structured fields.

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-loads what the tool does and its source, then examples. The parenthetical asides about HS6 and Comtrade are dense but each justifies the tool's differentiator; the source description runs slightly long for the value it adds.

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 an 8-parameter read tool with no output schema, the description covers source, granularity, dimensions, filter combinations, and return fields including units — enough for an agent to call it correctly without further documentation.

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 baseline is 3, but the description adds the combination semantics ('any combination, or none (totals)') that the schema does not spell out, plus the units returned per row. The chapter-vs-ncm exclusivity is already in the schema, so it earns no extra credit here.

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+resource (Brazil exports/imports over a date range) with source (MDIC Comex Stat), granularity (monthly, NCM8), and distinguishing traits versus Comtrade (finer than HS6, state dimension). An agent can tell this apart from br_trade_top_partners and br_trade_top_products, which rank rather than return flows over a range.

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?

Two concrete worked examples ('Brazil's soybean exports to China by month in 2025', 'Mato Grosso's exports in Q1 2025') make the intended use unambiguous, and it states that filters can be combined or omitted for totals. It stops short of explicitly excluding the ranking siblings, so the when-not is left to inference.

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.