Skip to main content
Glama

Classify HS Code

envia_classify_hscode
Read-onlyIdempotent

Classify product descriptions into Harmonized System (HS) codes for customs declarations, with confidence scores, destination-country options, and alternative codes.

Instructions

Classify a product description into a Harmonized System (HS) code for customs declarations.

Args: description — Product description to classify (e.g., "ceramic brake pads for automobiles") destination_countries — Comma-separated destination country codes (optional, e.g., "US,CA") include_alternatives — Include alternative HS codes (default: true) response_format — "markdown" (default) or "json"

Returns: HS code, description, confidence score, and alternative codes.

Errors: 400 — Invalid or empty description 403 — Invalid API key

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": {
      "description": "<description>"
    },
    "name": "envia_classify_hscode"
  }
}

Input Schema

NameRequiredDescriptionDefault
descriptionYesProduct description to classify (e.g., "ceramic brake pads for automobiles")
response_formatNoOutput format: 'markdown' for human-readable or 'json' for machine-readablemarkdown
include_alternativesNoInclude alternative HS codes (default: true)
destination_countriesNoComma-separated destination country codes (e.g., "US,CA")

Output Schema

NameRequiredDescriptionDefault
hs_codeYes
descriptionNo
alternativesNo
confidence_scoreNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.8/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 safety is covered by structured data. The description goes beyond that by documenting an auth requirement (403 for invalid API key), the input validation failure mode (400 for empty description), and the confidence-score shape of the result — genuinely useful context an agent cannot get from annotations.

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

Conciseness3/5

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

The purpose sentence is front-loaded and clear, and the Errors section is well sectioned. But the Args block duplicates schema descriptions word for word and the Returns block duplicates the output schema, so a meaningful fraction of the text earns no new information.

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?

With an output schema present and 100% schema coverage, the definition does not need to explain return fields, yet it still names the confidence score and alternatives so the agent knows to interpret them. Error codes and defaults are covered; only the absence of any usage routing keeps it short of a 5.

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%, so every parameter is already documented in the schema, including the enum for response_format. The Args block largely restates the schema text verbatim (e.g. the 'ceramic brake pads for automobiles' example appears in both) and adds no new meaning such as how destination_countries affects ranking of results. Baseline 3 applies when the schema does the heavy lifting.

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 first sentence states a specific verb (Classify), a specific input (product description), a specific output artifact (HS code) and the domain (customs declarations). None of the sibling tools deal with tariff classification, so the agent can distinguish it immediately without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'for customs declarations' implies the context in which to reach for this tool, and the optional destination_countries hints at jurisdiction-specific lookups. However, there is no explicit when-to-use vs. when-not guidance, no mention of prerequisites such as having a product description ready, and no routing to any alternative tool for a related task.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.