Skip to main content
Glama

Search HS codes

exim__hscode__search
Read-onlyIdempotent

Finds HS codes for a product keyword or code, widening the search until it finds strong matches; optionally restricted to one hierarchy level. Use it to classify a product before tariff, analytics or buyer search.

Input Schema

NameRequiredDescriptionDefault
levelNoRestrict to one hierarchy level
limitNoMax results (1-50, default 5)
queryYesHS code (digits) or product keyword

Output Schema

NameRequiredDescriptionDefault
dataYes
statsNo
_debugNo
summaryYes
warningsNo
nextActionsYes
correlationIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • removedInput schema / properties / --level
      Removed value: -{
      -  "description": "Restrict to one hierarchy level",
      -  "enum": [
      -    "section",
      -    "chapter",
      -    "heading",
      -    "subheading"
      -  ],
      -  "type": "string"
      -}
    • removedInput schema / properties / --limit
      Removed value: -{
      -  "description": "Max results (1-50, default 5)",
      -  "type": "integer"
      -}
    • removedInput schema / properties / --query
      Removed value: -{
      -  "description": "HS code (digits) or product keyword",
      -  "type": "string"
      -}
    • addedInput schema / properties / level
      Added value: +{
      +  "description": "Restrict to one hierarchy level",
      +  "enum": [
      +    "section",
      +    "chapter",
      +    "heading",
      +    "subheading"
      +  ],
      +  "maxLength": 8000,
      +  "type": "string"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Max results (1-50, default 5)",
      +  "maximum": 50,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / query
      Added value: +{
      +  "description": "HS code (digits) or product keyword",
      +  "maxLength": 8000,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "--query"
      -]New value: +[
      +  "query"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "value0": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "code": {
      +          "type": "string"
      +        },
      +        "full_path": {
      +          "type": "string"
      +        },
      +        "level": {
      +          "type": "string"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "parent_code": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "code",
      +        "name"
      +      ],
      +      "type": "object"
      +    },
      +    "value1": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "type": [
      +              "null",
      +              "boolean",
      +              "number",
      +              "string",
      +              "array",
      +              "object"
      +            ]
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "value2": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "$ref": "#/$defs/value3"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "value3": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "command": {
      +          "type": "string"
      +        },
      +        "cost": {
      +          "type": "string"
      +        },
      +        "label": {
      +          "type": "string"
      +        },
      +        "rationale": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "command",
      +        "cost",
      +        "label",
      +        "rationale"
      +      ],
      +      "type": "object"
      +    },
      +    "value4": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {
      +            "type": "number"
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "value5": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "$ref": "#/$defs/value6"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "value6": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "code": {
      +          "type": "string"
      +        },
      +        "message": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "code",
      +        "message"
      +      ],
      +      "type": "object"
      +    },
      +    "value7": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {
      +            "type": [
      +              "null",
      +              "boolean",
      +              "number",
      +              "string",
      +              "array",
      +              "object"
      +            ]
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "additionalProperties": false,
      +  "properties": {
      +    "_debug": {
      +      "$ref": "#/$defs/value7"
      +    },
      +    "correlationId": {
      +      "type": "string"
      +    },
      +    "data": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "context": {
      +          "type": [
      +            "null",
      +            "boolean",
      +            "number",
      +            "string",
      +            "array",
      +            "object"
      +          ]
      +        },
      +        "cursor": {
      +          "type": "string"
      +        },
      +        "has_more": {
      +          "type": "boolean"
      +        },
      +        "items": {
      +          "anyOf": [
      +            {
      +              "items": {
      +                "$ref": "#/$defs/value0"
      +              },
      +              "type": "array"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        }
      +      },
      +      "required": [
      +        "context",
      +        "has_more",
      +        "items"
      +      ],
      +      "type": "object"
      +    },
      +    "nextActions": {
      +      "$ref": "#/$defs/value2"
      +    },
      +    "stats": {
      +      "$ref": "#/$defs/value4"
      +    },
      +    "summary": {
      +      "type": "string"
      +    },
      +    "warnings": {
      +      "$ref": "#/$defs/value5"
      +    }
      +  },
      +  "required": [
      +    "data",
      +    "nextActions",
      +    "summary"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world. The description adds genuinely new behavior: the search widens until it finds strong matches, which tells the agent the result set is adaptive rather than a fixed-precision lookup. Rate limits and result-shaping details beyond that are absent.

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?

Two sentences, front-loaded with what the tool does and followed by the usage context; no filler. The semicolon-clause about hierarchy level is dense but earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema and rich annotations are present, so return values and the safety profile need not be restated. The description covers purpose, scope, adaptive-search behavior, and downstream workflow, leaving little an agent needs that is missing.

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 coverage is 100%, so all three parameters are already documented in the schema. The description restates the query (keyword or code) and level restriction but adds no syntax, default, or format detail beyond what the schema provides, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Finds') and resource ('HS codes') with both input modes (keyword or code) and the level restriction. It distinguishes itself well from data-query siblings like exim__tariff by framing itself as the classification step. It stops short of explicitly naming a sibling it replaces, so it lands at 4 rather than 5.

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?

'Use it to classify a product before tariff, analytics or buyer search' gives a clear workflow context that implies when to reach for this tool over the tariff/analytics siblings. There is no explicit when-not or named alternative tool, so it is clear context without exclusions.

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.