Skip to main content
Glama

Price and volume shocks

exim__market__anomalies
Read-onlyIdempotent

Flags periods where price or volume for an HS code into a destination deviates from that market's own baseline.

Input Schema

NameRequiredDescriptionDefault
toNoLatest month, YYYY-MM.
fromNoEarliest month, YYYY-MM.
bucketNotime bucket: month|quarter (def month)
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).
sourceNodataset source filter
originCountryNoOrigin (exporting) country, ISO2 code (e.g. VN).
destinationCountryYesDestination (importing) country, ISO2 code (e.g. US, DE).

Output Schema

NameRequiredDescriptionDefault
dataYes
statsNo
_debugNo
summaryYes
warningsNo
nextActionsYes
correlationIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • removedInput schema / properties / dest
      Removed value: -{
      -  "description": "Destination country (ISO 2)",
      -  "maxLength": 8000,
      -  "type": "string"
      -}
    • addedInput schema / properties / destinationCountry
      Added value: +{
      +  "description": "Destination (importing) country, ISO2 code (e.g. US, DE).",
      +  "maxLength": 8000,
      +  "type": "string"
      +}
    • changedInput schema / properties / from / description
      Previous value: -"earliest month (YYYY-MM; YYYY or YYYY-MM-DD also accepted)"New value: +"Earliest month, YYYY-MM."
    • 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"
      +}
    • removedInput schema / properties / origin
      Removed value: -{
      -  "description": "origin country (ISO 2) filter (narrow to one supplier country)",
      -  "maxLength": 8000,
      -  "type": "string"
      -}
    • addedInput schema / properties / originCountry
      Added value: +{
      +  "description": "Origin (exporting) country, ISO2 code (e.g. VN).",
      +  "maxLength": 8000,
      +  "type": "string"
      +}
    • changedInput schema / properties / to / description
      Previous value: -"latest month (YYYY-MM; YYYY or YYYY-MM-DD also accepted)"New value: +"Latest month, YYYY-MM."
    • changedInput schema / required
      Previous value: -[
      -  "dest",
      -  "hs6"
      -]New value: +[
      +  "destinationCountry",
      +  "hsCode"
      +]
  2. Changed9 schema fields changed
    • addedInput schema / properties / dest
      Added value: +{
      +  "description": "Destination country (ISO 2)",
      +  "maxLength": 8000,
      +  "type": "string"
      +}
    • removedInput schema / properties / destinationCountry
      Removed value: -{
      -  "description": "Destination (importing) country, ISO2 code (e.g. US, DE).",
      -  "maxLength": 8000,
      -  "type": "string"
      -}
    • changedInput schema / properties / from / description
      Previous value: -"Earliest month, YYYY-MM."New value: +"earliest month (YYYY-MM; YYYY or YYYY-MM-DD also accepted)"
    • 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"
      -}
    • addedInput schema / properties / origin
      Added value: +{
      +  "description": "origin country (ISO 2) filter (narrow to one supplier country)",
      +  "maxLength": 8000,
      +  "type": "string"
      +}
    • removedInput schema / properties / originCountry
      Removed value: -{
      -  "description": "Origin (exporting) country, ISO2 code (e.g. VN).",
      -  "maxLength": 8000,
      -  "type": "string"
      -}
    • changedInput schema / properties / to / description
      Previous value: -"Latest month, YYYY-MM."New value: +"latest month (YYYY-MM; YYYY or YYYY-MM-DD also accepted)"
    • changedInput schema / required
      Previous value: -[
      -  "destinationCountry",
      -  "hsCode"
      -]New value: +[
      +  "dest",
      +  "hs6"
      +]
  3. Changed9 schema fields changed
    • removedInput schema / properties / dest
      Removed value: -{
      -  "description": "Destination country (ISO 2)",
      -  "maxLength": 8000,
      -  "type": "string"
      -}
    • addedInput schema / properties / destinationCountry
      Added value: +{
      +  "description": "Destination (importing) country, ISO2 code (e.g. US, DE).",
      +  "maxLength": 8000,
      +  "type": "string"
      +}
    • changedInput schema / properties / from / description
      Previous value: -"earliest month (YYYY-MM; YYYY or YYYY-MM-DD also accepted)"New value: +"Earliest month, YYYY-MM."
    • 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"
      +}
    • removedInput schema / properties / origin
      Removed value: -{
      -  "description": "origin country (ISO 2) filter (narrow to one supplier country)",
      -  "maxLength": 8000,
      -  "type": "string"
      -}
    • addedInput schema / properties / originCountry
      Added value: +{
      +  "description": "Origin (exporting) country, ISO2 code (e.g. VN).",
      +  "maxLength": 8000,
      +  "type": "string"
      +}
    • changedInput schema / properties / to / description
      Previous value: -"latest month (YYYY-MM; YYYY or YYYY-MM-DD also accepted)"New value: +"Latest month, YYYY-MM."
    • changedInput schema / required
      Previous value: -[
      -  "dest",
      -  "hs6"
      -]New value: +[
      +  "destinationCountry",
      +  "hsCode"
      +]
  4. Changed16 schema fields changed
    • removedInput schema / properties / --bucket
      Removed value: -{
      -  "description": "time bucket: month|quarter (def month)",
      -  "enum": [
      -    "month",
      -    "quarter"
      -  ],
      -  "type": "string"
      -}
    • removedInput schema / properties / --dest
      Removed value: -{
      -  "description": "Destination country (ISO 2)",
      -  "type": "string"
      -}
    • removedInput schema / properties / --from
      Removed value: -{
      -  "description": "earliest month (YYYY-MM; YYYY or YYYY-MM-DD also accepted)",
      -  "pattern": "^[0-9]{4}(-(0[1-9]|1[0-2])(-(0[1-9]|[12][0-9]|3[01]))?)?$",
      -  "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"
      -}
    • removedInput schema / properties / --origin
      Removed value: -{
      -  "description": "origin country (ISO 2) filter (narrow to one supplier country)",
      -  "type": "string"
      -}
    • removedInput schema / properties / --source
      Removed value: -{
      -  "description": "dataset source filter",
      -  "type": "string"
      -}
    • removedInput schema / properties / --to
      Removed value: -{
      -  "description": "latest month (YYYY-MM; YYYY or YYYY-MM-DD also accepted)",
      -  "pattern": "^[0-9]{4}(-(0[1-9]|1[0-2])(-(0[1-9]|[12][0-9]|3[01]))?)?$",
      -  "type": "string"
      -}
    • addedInput schema / properties / bucket
      Added value: +{
      +  "description": "time bucket: month|quarter (def month)",
      +  "enum": [
      +    "month",
      +    "quarter"
      +  ],
      +  "maxLength": 8000,
      +  "type": "string"
      +}
    • addedInput schema / properties / dest
      Added value: +{
      +  "description": "Destination country (ISO 2)",
      +  "maxLength": 8000,
      +  "type": "string"
      +}
    • addedInput schema / properties / from
      Added value: +{
      +  "description": "earliest month (YYYY-MM; YYYY or YYYY-MM-DD also accepted)",
      +  "maxLength": 8000,
      +  "pattern": "^[0-9]{4}(-(0[1-9]|1[0-2])(-(0[1-9]|[12][0-9]|3[01]))?)?$",
      +  "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"
      +}
    • addedInput schema / properties / origin
      Added value: +{
      +  "description": "origin country (ISO 2) filter (narrow to one supplier country)",
      +  "maxLength": 8000,
      +  "type": "string"
      +}
    • addedInput schema / properties / source
      Added value: +{
      +  "description": "dataset source filter",
      +  "maxLength": 8000,
      +  "type": "string"
      +}
    • addedInput schema / properties / to
      Added value: +{
      +  "description": "latest month (YYYY-MM; YYYY or YYYY-MM-DD also accepted)",
      +  "maxLength": 8000,
      +  "pattern": "^[0-9]{4}(-(0[1-9]|1[0-2])(-(0[1-9]|[12][0-9]|3[01]))?)?$",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "--dest",
      -  "--hs6"
      -]New value: +[
      +  "dest",
      +  "hs6"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "value0": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "anomalies": {
      +          "$ref": "#/$defs/value2"
      +        },
      +        "coverage": {
      +          "$ref": "#/$defs/value4"
      +        },
      +        "periods": {
      +          "type": "integer"
      +        },
      +        "scope": {
      +          "$ref": "#/$defs/value1"
      +        },
      +        "verdict": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "anomalies",
      +        "coverage",
      +        "periods",
      +        "scope",
      +        "verdict"
      +      ],
      +      "type": "object"
      +    },
      +    "value1": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "value10": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {
      +            "type": "number"
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "value11": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "$ref": "#/$defs/value12"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "value12": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "code": {
      +          "type": "string"
      +        },
      +        "message": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "code",
      +        "message"
      +      ],
      +      "type": "object"
      +    },
      +    "value13": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {
      +            "type": [
      +              "null",
      +              "boolean",
      +              "number",
      +              "string",
      +              "array",
      +              "object"
      +            ]
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "value2": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "$ref": "#/$defs/value3"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "value3": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "baseline": {
      +          "type": "number"
      +        },
      +        "changePct": {
      +          "type": "number"
      +        },
      +        "kind": {
      +          "type": "string"
      +        },
      +        "period": {
      +          "type": "string"
      +        },
      +        "value": {
      +          "type": "number"
      +        },
      +        "zScore": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "baseline",
      +        "changePct",
      +        "kind",
      +        "period",
      +        "value",
      +        "zScore"
      +      ],
      +      "type": "object"
      +    },
      +    "value4": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "blindSpot": {
      +          "type": "string"
      +        },
      +        "confidence": {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "country": {
      +          "$ref": "#/$defs/value5"
      +        },
      +        "display": {
      +          "type": "string"
      +        },
      +        "period": {
      +          "$ref": "#/$defs/value6"
      +        },
      +        "scope": {
      +          "type": "string"
      +        },
      +        "status": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "confidence",
      +        "country",
      +        "display",
      +        "period",
      +        "status"
      +      ],
      +      "type": "object"
      +    },
      +    "value5": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "value6": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "end": {
      +          "type": "string"
      +        },
      +        "start": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "end",
      +        "start"
      +      ],
      +      "type": "object"
      +    },
      +    "value7": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "type": [
      +              "null",
      +              "boolean",
      +              "number",
      +              "string",
      +              "array",
      +              "object"
      +            ]
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "value8": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "$ref": "#/$defs/value9"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "value9": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "command": {
      +          "type": "string"
      +        },
      +        "cost": {
      +          "type": "string"
      +        },
      +        "label": {
      +          "type": "string"
      +        },
      +        "rationale": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "command",
      +        "cost",
      +        "label",
      +        "rationale"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "additionalProperties": false,
      +  "properties": {
      +    "_debug": {
      +      "$ref": "#/$defs/value13"
      +    },
      +    "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/value8"
      +    },
      +    "stats": {
      +      "$ref": "#/$defs/value10"
      +    },
      +    "summary": {
      +      "type": "string"
      +    },
      +    "warnings": {
      +      "$ref": "#/$defs/value11"
      +    }
      +  },
      +  "required": [
      +    "data",
      +    "nextActions",
      +    "summary"
      +  ],
      +  "type": "object"
      +}
  5. First observed

TDQS

B3.3/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 profile is covered without description help. The description adds useful behavioural context by explaining the detection basis ('that market's own baseline' rather than an absolute threshold), but it says nothing about sensitivity, thresholds, or what a flagged period contains.

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?

A single front-loaded sentence that states the trigger condition and the comparison basis with zero padding. Nothing is wasted and the key scoping detail (HS code into a destination) comes first.

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

Completeness3/5

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

An output schema exists, so return values need not be described, and annotations cover safety. However, for a 7-parameter, signal-style tool set alongside many similar siblings, the definition gives no guidance on alternative tools, result interpretation, or how the baseline/anomaly threshold behaves, leaving a real gap.

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 every parameter is documented in-schema (including the HS-code padding warning and date formats), so the baseline is 3. The description only restates the hsCode/destinationCountry roles already covered by the schema and adds no filtering or formatting nuance beyond it.

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?

The description pairs a specific verb ('Flags') with a precise resource ('periods where price or volume ... deviates from that market's own baseline'), and the HS-code-into-destination scoping is clear. It is intelligible on its own, but it does not distinguish itself from the close sibling exim__analytics__anomalies or from signal-style siblings like market__momentum/market__trend, so it stops short of a 5.

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

Usage Guidelines2/5

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

There is no explicit statement of when to use this tool versus the many neighbouring market/analytics tools, nor any prerequisites, exclusions, or required-parameter guidance. Usage is only loosely implied by the purpose sentence, so guidance is effectively absent.

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.