Skip to main content
Glama

Compare markets for a product

exim__market__compare
Read-onlyIdempotent

Compares one HS code across several destination countries side by side: value, price per kg, growth and top buyer. Use it to choose which market to target.

Input Schema

NameRequiredDescriptionDefault
hsCodeYesHS code at 2, 4 or 6 digits; shorter codes match the whole family (0901 = all coffee). Do not pad with zeros (090100 matches nothing).
destinationCountriesYesComma-separated destination ISO2 codes to compare (e.g. US,DE,JP).

Output Schema

NameRequiredDescriptionDefault
dataYes
statsNo
_debugNo
summaryYes
warningsNo
nextActionsYes
correlationIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / destinationCountries
      Added value: +{
      +  "description": "Comma-separated destination ISO2 codes to compare (e.g. US,DE,JP).",
      +  "maxLength": 8000,
      +  "type": "string"
      +}
    • removedInput schema / properties / dests
      Removed value: -{
      -  "description": "comma-separated destination ISO2 list to compare the HS across",
      -  "maxLength": 8000,
      -  "type": "string"
      -}
    • removedInput schema / properties / hs6
      Removed value: -{
      -  "description": "HS code at ANY granularity — 2/4/6-digit; a shorter code is a broader family (e.g. 0901 = all coffee). Do NOT pad to 6 digits: 090100 matches nothing.",
      -  "maxLength": 8000,
      -  "type": "string"
      -}
    • addedInput schema / properties / hsCode
      Added value: +{
      +  "description": "HS code at 2, 4 or 6 digits; shorter codes match the whole family (0901 = all coffee). Do not pad with zeros (090100 matches nothing).",
      +  "maxLength": 8000,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "dests",
      -  "hs6"
      -]New value: +[
      +  "destinationCountries",
      +  "hsCode"
      +]
  2. Changed5 schema fields changed
    • removedInput schema / properties / destinationCountries
      Removed value: -{
      -  "description": "Comma-separated destination ISO2 codes to compare (e.g. US,DE,JP).",
      -  "maxLength": 8000,
      -  "type": "string"
      -}
    • addedInput schema / properties / dests
      Added value: +{
      +  "description": "comma-separated destination ISO2 list to compare the HS across",
      +  "maxLength": 8000,
      +  "type": "string"
      +}
    • addedInput schema / properties / hs6
      Added value: +{
      +  "description": "HS code at ANY granularity — 2/4/6-digit; a shorter code is a broader family (e.g. 0901 = all coffee). Do NOT pad to 6 digits: 090100 matches nothing.",
      +  "maxLength": 8000,
      +  "type": "string"
      +}
    • removedInput schema / properties / hsCode
      Removed value: -{
      -  "description": "HS code at 2, 4 or 6 digits; shorter codes match the whole family (0901 = all coffee). Do not pad with zeros (090100 matches nothing).",
      -  "maxLength": 8000,
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "destinationCountries",
      -  "hsCode"
      -]New value: +[
      +  "dests",
      +  "hs6"
      +]
  3. Changed5 schema fields changed
    • addedInput schema / properties / destinationCountries
      Added value: +{
      +  "description": "Comma-separated destination ISO2 codes to compare (e.g. US,DE,JP).",
      +  "maxLength": 8000,
      +  "type": "string"
      +}
    • removedInput schema / properties / dests
      Removed value: -{
      -  "description": "comma-separated destination ISO2 list to compare the HS across",
      -  "maxLength": 8000,
      -  "type": "string"
      -}
    • removedInput schema / properties / hs6
      Removed value: -{
      -  "description": "HS code at ANY granularity — 2/4/6-digit; a shorter code is a broader family (e.g. 0901 = all coffee). Do NOT pad to 6 digits: 090100 matches nothing.",
      -  "maxLength": 8000,
      -  "type": "string"
      -}
    • addedInput schema / properties / hsCode
      Added value: +{
      +  "description": "HS code at 2, 4 or 6 digits; shorter codes match the whole family (0901 = all coffee). Do not pad with zeros (090100 matches nothing).",
      +  "maxLength": 8000,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "dests",
      -  "hs6"
      -]New value: +[
      +  "destinationCountries",
      +  "hsCode"
      +]
  4. Changed6 schema fields changed
    • removedInput schema / properties / --dests
      Removed value: -{
      -  "description": "comma-separated destination ISO2 list to compare the HS across",
      -  "type": "string"
      -}
    • removedInput schema / properties / --hs6
      Removed value: -{
      -  "description": "HS code at ANY granularity — 2/4/6-digit; a shorter code is a broader family (e.g. 0901 = all coffee). Do NOT pad to 6 digits: 090100 matches nothing.",
      -  "type": "string"
      -}
    • addedInput schema / properties / dests
      Added value: +{
      +  "description": "comma-separated destination ISO2 list to compare the HS across",
      +  "maxLength": 8000,
      +  "type": "string"
      +}
    • addedInput schema / properties / hs6
      Added value: +{
      +  "description": "HS code at ANY granularity — 2/4/6-digit; a shorter code is a broader family (e.g. 0901 = all coffee). Do NOT pad to 6 digits: 090100 matches nothing.",
      +  "maxLength": 8000,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "--dests",
      -  "--hs6"
      -]New value: +[
      +  "dests",
      +  "hs6"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "value0": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "cheapestSource": {
      +          "type": "string"
      +        },
      +        "fastestGrowth": {
      +          "type": "string"
      +        },
      +        "hs6": {
      +          "type": "string"
      +        },
      +        "largestMarket": {
      +          "type": "string"
      +        },
      +        "markets": {
      +          "$ref": "#/$defs/value1"
      +        },
      +        "priceSpreadPerKg": {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "verdict": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "hs6",
      +        "markets",
      +        "priceSpreadPerKg",
      +        "verdict"
      +      ],
      +      "type": "object"
      +    },
      +    "value1": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "$ref": "#/$defs/value2"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "value2": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "avgPricePerKg": {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "destination": {
      +          "type": "string"
      +        },
      +        "growthMeasure": {
      +          "type": "string"
      +        },
      +        "growthRatio": {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "shipmentCount": {
      +          "type": "integer"
      +        },
      +        "topBuyer": {
      +          "type": "string"
      +        },
      +        "totalValueUsd": {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "uniqueBuyers": {
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "avgPricePerKg",
      +        "destination",
      +        "growthMeasure",
      +        "growthRatio",
      +        "shipmentCount",
      +        "topBuyer",
      +        "totalValueUsd",
      +        "uniqueBuyers"
      +      ],
      +      "type": "object"
      +    },
      +    "value3": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "type": [
      +              "null",
      +              "boolean",
      +              "number",
      +              "string",
      +              "array",
      +              "object"
      +            ]
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "value4": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "$ref": "#/$defs/value5"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "value5": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "command": {
      +          "type": "string"
      +        },
      +        "cost": {
      +          "type": "string"
      +        },
      +        "label": {
      +          "type": "string"
      +        },
      +        "rationale": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "command",
      +        "cost",
      +        "label",
      +        "rationale"
      +      ],
      +      "type": "object"
      +    },
      +    "value6": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {
      +            "type": "number"
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "value7": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "$ref": "#/$defs/value8"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "value8": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "code": {
      +          "type": "string"
      +        },
      +        "message": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "code",
      +        "message"
      +      ],
      +      "type": "object"
      +    },
      +    "value9": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {
      +            "type": [
      +              "null",
      +              "boolean",
      +              "number",
      +              "string",
      +              "array",
      +              "object"
      +            ]
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "additionalProperties": false,
      +  "properties": {
      +    "_debug": {
      +      "$ref": "#/$defs/value9"
      +    },
      +    "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/value4"
      +    },
      +    "stats": {
      +      "$ref": "#/$defs/value6"
      +    },
      +    "summary": {
      +      "type": "string"
      +    },
      +    "warnings": {
      +      "$ref": "#/$defs/value7"
      +    }
      +  },
      +  "required": [
      +    "data",
      +    "nextActions",
      +    "summary"
      +  ],
      +  "type": "object"
      +}
  5. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety and idempotency profile is covered without prose. The description adds no behavioral context beyond that — no mention of result caps, rate limits, cost, or how many countries can be compared at once — and the returned fields it lists are already covered by the existing output schema.

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?

One tight sentence that front-loads the operation and the compared metrics, followed by a short usage clause. No filler, no repetition of the title.

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 covering return values and annotations covering safety, the description needs only to convey scope, inputs and intent — which it does. The one gap is the absence of any ceiling on how many destination countries can be compared, which matters for a tool whose second parameter is an unbounded comma-separated list.

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%, and the schema already documents HS code digit rules, zero-padding pitfalls, and the ISO2 comma-separated format. The description only restates the shape ('one HS code', 'several destination countries') without adding format or constraint detail, 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 (compares) and resource (one HS code across several destination countries) and enumerates the compared dimensions: value, price per kg, growth, top buyer. It is distinguishable in spirit from single-market siblings like exim__market__growth or exim__market__trend, but never names them, so the differentiation is implicit rather than explicit.

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?

'Use it to choose which market to target' gives a usage context, so the tool's role is inferable. However, it names no alternatives and no exclusions — nothing tells the agent when to prefer exim__market__growth, exim__market__momentum or exim__trade__lookup instead, which is exactly the ambiguity a multi-country comparison tool needs to resolve.

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.