Skip to main content
Glama

Check colour stock

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. Duo Roller: colour is one blockout and one sheer written "Blockout + Sheer" (get_product returns duo_fabrics).

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": {
      "product_id": "<product_id>",
      "colour_name": "<colour_name>"
    },
    "name": "check_colour_stock"
  }
}

Input Schema

NameRequiredDescriptionDefault
product_idYes
colour_nameYes

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. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds real behavioral context beyond that: a bounded result shape (in_stock boolean, expected_restock_date on failure, up to 5 alternatives ordered by similarity) and an input-format constraint for Duo Roller. It does not say whether availability is real-time or cached, which is the main remaining gap.

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?

Front-loaded with purpose and the when-to-use trigger, then the return shape, then the edge case — a sensible ordering. The Duo Roller parenthetical is dense and slightly cryptic taken alone, but every sentence supplies information an agent would otherwise have to guess.

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?

For a two-parameter read-only check, the definition covers purpose, trigger, and return content well beyond what the sparse input schema provides; the output schema means return values did not need restating, so that redundancy is harmless. Only the product_id contract and the freshness of the stock data are left unaddressed.

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 0%, so the description carries the burden of explaining both parameters. It does add genuine meaning for colour_name in the Duo Roller case ('Blockout + Sheer', sourced from get_product's duo_fabrics), but product_id is never characterized (ID format, or whether it comes from lookup_catalog/search_catalog), leaving that parameter opaque.

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 specific colour is available') and immediately ties it to the downstream action configure_product, so the agent knows this is a pre-flight availability check rather than a catalog search. It is clearly distinguished from siblings like get_product or search_catalog.

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?

Gives two explicit triggers: a customer requesting a named colour, and wanting to prevent a configure_product failure from an out-of-stock selection. It also routes correctly for the edge case by pointing at get_product's duo_fabrics for Duo Roller combinations, which implicitly tells the agent where to get the colour string before calling.

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.

Resources