Skip to main content
Glama

CULT+MATH Decision Briefs

Where do US imports of this product come from now?

run_trade_concentration
Read-onlyIdempotent

Use when the user asks whether supply of a product has really diversified, how exposed US imports are to one country, or who gained share after tariffs or reshoring. Returns, for two years, the top-three partners' share of US imports of the HS code, the largest single source, a concentration index, and the partners that gained and lost the most share, from US Census Bureau trade data. Refuses before you are charged if the partner rows do not add up to the world total. Every result carries a run id, a date and a citation line. Calling this tool returns a quote, not the result: what the run measures, its price and a payment_url. The run happens only when you POST to payment_url, and a run that fails its controls refuses there with nothing charged. Dimensions (vary these inputs to cut the answer; each call is its own run): over time: built in: two years (start, end); place: partner countries (in the result). Price: $0.05 per run over x402 (USDC on Base, no account needed), or $0.50 over MPP (a Stripe shared payment token); charged only when the run comes back sound. For the duty actually paid on that product, by country, use run_effective_duty.

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": {
      "hs": "<hs>",
      "start": "<start>",
      "end": "<end>"
    },
    "name": "run_trade_concentration"
  }
}

Input Schema

NameRequiredDescriptionDefault
hsYesA 4- or 6-digit HS code, e.g. "8542" for integrated circuits.
endYesThe later year (the latest full year is usually the one before last).
startYesThe earlier year.

Output Schema

NameRequiredDescriptionDefault
noteNoWhy the run is unavailable, when it is.
errorNoWhy the inputs were refused, with the expected usage. Nothing is charged.
limitsNoWhat the run cannot tell you, stated before you pay.
recipeNoThe run, e.g. "filing-trend".
availableNofalse when the run is switched off; then nothing can be charged.
next_stepNoWhat to tell the user before paying.
price_usdNoPrice over MPP (Stripe shared payment token).
payment_urlNoPOST here to run and pay. Not a checkout page.
instructionsNoHow to pay over MPP and x402, and how to ask for publication.
what_you_getNoWhat the paid result will contain for these inputs.
x402_price_usdNoPrice over x402 (USDC on Base), when offered.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "available": {
      +      "description": "false when the run is switched off; then nothing can be charged.",
      +      "type": "boolean"
      +    },
      +    "error": {
      +      "description": "Why the inputs were refused, with the expected usage. Nothing is charged.",
      +      "type": "string"
      +    },
      +    "instructions": {
      +      "description": "How to pay over MPP and x402, and how to ask for publication.",
      +      "type": "object"
      +    },
      +    "limits": {
      +      "description": "What the run cannot tell you, stated before you pay."
      +    },
      +    "next_step": {
      +      "description": "What to tell the user before paying.",
      +      "type": "string"
      +    },
      +    "note": {
      +      "description": "Why the run is unavailable, when it is.",
      +      "type": "string"
      +    },
      +    "payment_url": {
      +      "description": "POST here to run and pay. Not a checkout page.",
      +      "type": "string"
      +    },
      +    "price_usd": {
      +      "description": "Price over MPP (Stripe shared payment token).",
      +      "type": "number"
      +    },
      +    "recipe": {
      +      "description": "The run, e.g. \"filing-trend\".",
      +      "type": "string"
      +    },
      +    "what_you_get": {
      +      "description": "What the paid result will contain for these inputs.",
      +      "type": "string"
      +    },
      +    "x402_price_usd": {
      +      "description": "Price over x402 (USDC on Base), when offered.",
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Added

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered. The description adds genuinely valuable non-annotation behavior: the call returns only a quote with a price and payment_url, the run executes only on a POST, controls can refuse with nothing charged, and each call is a separate billable run. However, the two-phase quote/payment model sits oddly beside a readOnly/idempotent annotation, which an agent may need to reconcile before trusting repeated calls are free.

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?

Use conditions are front-loaded and the sentence ordering (what it returns, what it refuses, what a call yields, how to pay) is logical. It runs long and the charging caveat appears twice in slightly different words, which costs a bit of tightness but not comprehension.

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 output schema, the description need not enumerate return fields, yet it still names the key measures and notes that every result carries a run id, date and citation. Combined with pricing, payment flow, and refusal-on-failed-controls behavior, an agent has everything needed to call it and to tell the user what will happen.

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 description coverage is 100%, with the HS pattern and the year fields already documented, so the baseline is 3. The description only adds the framing that the window is fixed at two years via start/end and that partner countries are a result rather than an input, which is mildly useful but largely restates the schema.

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 names a specific analytical output set — top-three partners' share of US imports for an HS code, the largest single source, a concentration index, and biggest share gainers/losers — over two years from Census data. It also names the sibling run_effective_duty and states what that one covers instead, so an agent can separate them without opening either schema.

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 opens with explicit trigger conditions: diversification questions, single-country exposure, and who gained share after tariffs or reshoring. It closes by routing a different question (duty actually paid, by country) to run_effective_duty, giving both a when-to-use and a when-not-to-use path.

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