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").

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 cover safety (readOnly, idempotent) but the description contributes real behavioral context beyond them: the data is proxied live rather than a bulk copy, granularity is monthly, output includes value in USD FOB and net weight in kg with all codes resolved to names, and state breakdown is a dimension Comtrade lacks. That is exactly the extra context the annotations cannot supply.

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 live-proxy caveat are front-loaded, and each sentence carries information. It is dense with parenthetical asides (NCM8 vs HS6, state-dimension comparisons) that make it slightly heavy to scan, but nothing is filler.

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?

With 8 parameters, no output schema, and no enums, the description covers the gaps: it names the returned measures and units, explains code-name resolution, and clarifies filter composability. An agent has everything needed to construct a correct call.

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 genuine meaning: it explains why ncm is 8-digit (finer than HS6) versus 2-digit chapter, what the state dimension represents, and that filters compose freely or can be omitted for totals. It even demonstrates parameter binding in the two examples, exceeding what the schema alone conveys.

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 — Brazil exports/imports over a date range from MDIC Comex Stat — and pins down the distinctive scope (NCM8 monthly granularity, optional state dimension). It explicitly contrasts with what UN Comtrade reports for Brazil, which separates it from the generic trade siblings br_trade_top_partners and br_trade_top_products.

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?

Provides two fully worked example queries mapping natural-language questions to concrete parameter sets, plus the rule that any filter combination or none (totals) is valid. It does not, however, explicitly route to the ranking siblings (top_partners/top_products) or state when this tool is the wrong choice, so the when-not guidance is absent.

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.