Skip to main content
Glama

Census Exports

census_exports
Read-onlyIdempotent

Search US export data by HS commodity code and/or country. Returns export values, quantities, and commodity details. Pass country as a plain English name (e.g. "Mexico"). Omit hs_code for total exports to a country; omit country for all countries combined.

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": {
      "year": "2025",
      "country": "Mexico",
      "hs_code": "87"
    },
    "name": "census_exports"
  }
}

Input Schema

NameRequiredDescriptionDefault
yearYesTrade year (e.g., "2024")
limitNoMaximum number of records to return (default 20)
monthNoTrade month 01-12. Optional, omit for annual data.
countryNoCountry name in plain English (e.g., "Mexico", "South Korea", "European Union"). Preferred over country_code, this is resolved for you. Optional, omit for all countries combined.
hs_codeNoHS commodity code at 2, 4, or 6 digit level (e.g., "8471" for computers). Optional, omit for total exports across all commodities.
country_codeNoCensus Schedule C country code if you already have one (e.g., "5700" China, "2010" Mexico). NOT an ISO code, "MX" and "CN" will not work. Prefer `country` and pass a name instead. Optional.

Output Schema

NameRequiredDescriptionDefault
typeYesTrade direction indicator
countYesNumber of records returned
periodYesTrade period (year or year-month)
hs_codeYesHS commodity code queried
recordsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / country / description
      Previous value: -"Country name in plain English (e.g., \"Mexico\", \"South Korea\", \"European Union\"). Preferred over country_code — this is resolved for you. Optional — omit for all countries combined."New value: +"Country name in plain English (e.g., \"Mexico\", \"South Korea\", \"European Union\"). Preferred over country_code, this is resolved for you. Optional, omit for all countries combined."
    • changedInput schema / properties / country_code / description
      Previous value: -"Census Schedule C country code if you already have one (e.g., \"5700\" China, \"2010\" Mexico). NOT an ISO code — \"MX\" and \"CN\" will not work. Prefer `country` and pass a name instead. Optional."New value: +"Census Schedule C country code if you already have one (e.g., \"5700\" China, \"2010\" Mexico). NOT an ISO code, \"MX\" and \"CN\" will not work. Prefer `country` and pass a name instead. Optional."
    • changedInput schema / properties / hs_code / description
      Previous value: -"HS commodity code at 2, 4, or 6 digit level (e.g., \"8471\" for computers). Optional — omit for total exports across all commodities."New value: +"HS commodity code at 2, 4, or 6 digit level (e.g., \"8471\" for computers). Optional, omit for total exports across all commodities."
    • changedInput schema / properties / month / description
      Previous value: -"Trade month 01-12. Optional — omit for annual data."New value: +"Trade month 01-12. Optional, omit for annual data."
  2. Changed3 schema fields changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "hs_code": "8471",
      -    "year": "2024"
      -  },
      -  {
      -    "country_code": "2010",
      -    "hs_code": "2709",
      -    "limit": 30,
      -    "year": "2023"
      -  },
      -  {
      -    "country_code": "2010",
      -    "year": "2024"
      -  }
      -]New value: +[
      +  {
      +    "country": "Mexico",
      +    "hs_code": "87",
      +    "year": "2025"
      +  },
      +  {
      +    "hs_code": "8471",
      +    "year": "2024"
      +  },
      +  {
      +    "country_code": "2010",
      +    "hs_code": "2709",
      +    "limit": 30,
      +    "year": "2023"
      +  },
      +  {
      +    "country_code": "2010",
      +    "year": "2024"
      +  }
      +]
    • addedInput schema / properties / country
      Added value: +{
      +  "description": "Country name in plain English (e.g., \"Mexico\", \"South Korea\", \"European Union\"). Preferred over country_code — this is resolved for you. Optional — omit for all countries combined.",
      +  "type": "string"
      +}
    • changedInput schema / properties / country_code / description
      Previous value: -"Census country code (e.g., \"5700\" for China, \"2010\" for Mexico). Optional — omit for all countries."New value: +"Census Schedule C country code if you already have one (e.g., \"5700\" China, \"2010\" Mexico). NOT an ISO code — \"MX\" and \"CN\" will not work. Prefer `country` and pass a name instead. Optional."
  3. Changed4 schema fields changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "hs_code": "8471",
      -    "year": "2024"
      -  },
      -  {
      -    "country_code": "2010",
      -    "hs_code": "2709",
      -    "limit": 30,
      -    "year": "2023"
      -  }
      -]New value: +[
      +  {
      +    "hs_code": "8471",
      +    "year": "2024"
      +  },
      +  {
      +    "country_code": "2010",
      +    "hs_code": "2709",
      +    "limit": 30,
      +    "year": "2023"
      +  },
      +  {
      +    "country_code": "2010",
      +    "year": "2024"
      +  }
      +]
    • changedInput schema / properties / country_code / description
      Previous value: -"Census country code (e.g., \"5700\" for China). Optional — omit for all countries."New value: +"Census country code (e.g., \"5700\" for China, \"2010\" for Mexico). Optional — omit for all countries."
    • changedInput schema / properties / hs_code / description
      Previous value: -"HS commodity code at 2, 4, or 6 digit level (e.g., \"8471\" for computers)"New value: +"HS commodity code at 2, 4, or 6 digit level (e.g., \"8471\" for computers). Optional — omit for total exports across all commodities."
    • changedInput schema / required
      Previous value: -[
      -  "hs_code",
      -  "year"
      -]New value: +[
      +  "year"
      +]
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "count": {
      +      "description": "Number of records returned",
      +      "type": "number"
      +    },
      +    "hs_code": {
      +      "description": "HS commodity code queried",
      +      "type": "string"
      +    },
      +    "period": {
      +      "description": "Trade period (year or year-month)",
      +      "type": "string"
      +    },
      +    "records": {
      +      "items": {
      +        "properties": {
      +          "commodity_code": {
      +            "description": "HS commodity code",
      +            "type": "string"
      +          },
      +          "country_code": {
      +            "description": "Census country code",
      +            "type": "string"
      +          },
      +          "country_name": {
      +            "description": "Country name",
      +            "type": "string"
      +          },
      +          "export_value_usd": {
      +            "description": "Export value in USD",
      +            "type": "number"
      +          },
      +          "period": {
      +            "description": "Trade period",
      +            "type": "string"
      +          },
      +          "quantity": {
      +            "description": "Export quantity",
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "commodity_code",
      +          "country_code",
      +          "country_name",
      +          "export_value_usd",
      +          "quantity",
      +          "period"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "type": {
      +      "description": "Trade direction indicator",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "type",
      +    "hs_code",
      +    "period",
      +    "count",
      +    "records"
      +  ],
      +  "type": "object"
      +}
  5. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "hs_code": "8471",
      +    "year": "2024"
      +  },
      +  {
      +    "country_code": "2010",
      +    "hs_code": "2709",
      +    "limit": 30,
      +    "year": "2023"
      +  }
      +]
  6. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the safety profile is covered. The description adds behavior beyond that: it discloses the return payload composition and that a plain-English country name is "resolved for you" on the server side, which is a non-obvious server behavior. It does not mention pagination, coverage limits, or latency, keeping it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, zero filler, front-loaded with purpose and return content before the parameter guidance. Every sentence carries distinct 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?

For a six-parameter, one-required search tool with an output schema and full schema coverage, the description supplies everything needed to call it correctly: purpose, return shape, the country-name convention, and aggregation behavior. Return-value details are legitimately delegated to the output schema.

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 description coverage is 100%, so baseline would be 3; the description earns an extra point by explaining parameter interaction semantics (omit-one-to-aggregate) and by reinforcing the country-vs-country_code preference with a worked example ("Mexico"). It still mostly restates what the schema already says about the plain-English name.

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 verb and resource ("Search US export data") plus the two filter axes (HS commodity code and/or country), and it names what is returned (export values, quantities, commodity details). The word "export" alone separates it from the census_imports sibling without requiring the schema to be opened.

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?

It gives real combinatorial guidance: "Omit hs_code for total exports to a country; omit country for all countries combined," which tells the agent how to get aggregate vs. granular results. It stops short of naming the sibling to use for import data or disambiguating against census_trade_balance / census_trade_trends, so the alternatives are left implicit.

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.