Skip to main content
Glama

check_colour_stock

Read-only

Verify whether a specific colour is available before configure_product. Returns in_stock boolean, expected_restock_date if out of stock, and up to 5 alternative in-stock colours ordered by similarity. Call this when a customer requests a named colour or when you want to prevent a configure_product failure due to an out-of-stock selection.

Input Schema

NameRequiredDescriptionDefault
product_idYesproduct_id from search_catalog or lookup_catalog.
colour_nameYesColour name to check, e.g. "White".

Output Schema

NameRequiredDescriptionDefault
foundNo
colourNo
messageNo
in_stockYes
product_idNo
expected_restockNo
matching_coloursNo
available_coloursNo
exact_colour_matchNo
requires_exact_colour_selectionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / colour_name / description
      Added value: +"Colour name to check, e.g. \"White\"."
    • addedInput schema / properties / product_id / description
      Added value: +"product_id from search_catalog or lookup_catalog."
  2. Changed12 schema fields changed
    • removedOutput schema / properties / alternative_colours
      Removed value: -{
      -  "items": {
      -    "additionalProperties": true,
      -    "properties": {
      -      "colour_name": {
      -        "type": "string"
      -      },
      -      "in_stock": {
      -        "type": "boolean"
      -      },
      -      "swatch_url": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "colour_name",
      -      "in_stock"
      -    ],
      -    "type": "object"
      -  },
      -  "type": "array"
      -}
    • addedOutput schema / properties / colour
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / colour_name
      Removed value: -{
      -  "type": "string"
      -}
    • removedOutput schema / properties / matching_colours / items / properties / colour_name
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / matching_colours / items / properties / expected_restock
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / matching_colours / items / properties / finish
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / matching_colours / items / properties / hex
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / matching_colours / items / properties / material
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / matching_colours / items / properties / name
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / matching_colours / items / properties / swatch_url
      Removed value: -{
      -  "type": "string"
      -}
    • changedOutput schema / properties / matching_colours / items / required
      Previous value: -[
      -  "colour_name",
      -  "in_stock"
      -]New value: +[
      +  "name",
      +  "in_stock"
      +]
    • removedOutput schema / properties / swatch_url
      Removed value: -{
      -  "type": "string"
      -}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "alternative_colours": {
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "colour_name": {
      +            "type": "string"
      +          },
      +          "in_stock": {
      +            "type": "boolean"
      +          },
      +          "swatch_url": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "colour_name",
      +          "in_stock"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "available_colours": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "colour_name": {
      +      "type": "string"
      +    },
      +    "exact_colour_match": {
      +      "type": "boolean"
      +    },
      +    "expected_restock": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "found": {
      +      "type": "boolean"
      +    },
      +    "in_stock": {
      +      "type": "boolean"
      +    },
      +    "matching_colours": {
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "colour_name": {
      +            "type": "string"
      +          },
      +          "in_stock": {
      +            "type": "boolean"
      +          },
      +          "swatch_url": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "colour_name",
      +          "in_stock"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "product_id": {
      +      "type": "string"
      +    },
      +    "requires_exact_colour_selection": {
      +      "type": "boolean"
      +    },
      +    "swatch_url": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "in_stock"
      +  ],
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so safety is covered, and the description adds real behavioral detail: a boolean result, a restock date on failure, and a capped, similarity-ordered alternative list. It does not discuss matching semantics (e.g. case sensitivity, fuzzy vs exact colour names), which is the one behavior an agent might still need.

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?

Three sentences, front-loaded with the core purpose and followed by return shape and call conditions. No filler or restatement of the tool name.

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 annotations covering the safety profile, the description only needs to explain intent and timing, which it does. Minor gaps remain around colour-name matching rules and what happens with an unrecognized colour name.

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% and both parameters carry their own descriptions, including the provenance hint for product_id. The description adds no additional parameter meaning beyond what the schema already provides, so baseline 3 applies.

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?

States a specific verb and resource — verify whether a colour is in stock — and ties it to a concrete workflow (before configure_product). It is clearly distinguishable from catalog/search siblings because it checks stock rather than retrieving product data.

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

Usage Guidelines5/5

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

Explicitly names the trigger conditions: a customer requesting a named colour, or wanting to avoid a configure_product failure from an out-of-stock selection. The alternative (configure_product) and the ordering relationship between the two tools are spelled out rather than inferred.

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.