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.

Input Schema

TableJSON 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

TableJSON 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. 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."
  2. 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"
      +]
  3. 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"
      +}
  4. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "hs_code": "8471",
      +    "year": "2024"
      +  },
      +  {
      +    "country_code": "2010",
      +    "hs_code": "2709",
      +    "limit": 30,
      +    "year": "2023"
      +  }
      +]
  5. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations provide safety profile (readOnly, idempotent, non-destructive). The description adds value by stating return contents (values, quantities, commodity details) and clarifying that plain English country names are resolved for the user. No contradictions with annotations.

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?

Two sentences with no filler. The first sentence states purpose and returns; the second provides essential usage instructions. Front-loaded and efficient.

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?

The description covers the primary usage variants and return content. With an output schema present and annotations covering safety, the description is sufficient for an agent to invoke the tool correctly. Remaining parameters (month, limit, country_code) are already explained in the 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 coverage is 100%, so baseline is 3. The description adds meaningful aggregation semantics: omitting `hs_code` gives total exports to a country, omitting `country` gives all countries combined. This goes beyond the schema's optional flags and helps understand combined parameter behavior.

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 'Search US export data by HS commodity code and/or country' with a specific verb, resource, and scope. This clearly distinguishes it from sibling tools like census_imports, census_trade_balance, and census_trade_trends.

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?

The description gives clear parameter usage patterns: pass `country` as a plain English name, omit `hs_code` for country totals, omit `country` for all countries combined. However, it does not explicitly name alternatives like census_imports, though the tool name and context make the domain obvious.

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.