Skip to main content
Glama

Match the customer's words to option ids

match_options
Read-onlyIdempotent

Turns the customer's words ("velvet", "A5", "double sided", "500", "90 x 55mm", "round corners") into option ids for one product, given what is already chosen. Returns matches, the ambiguous phrases with every candidate (never a guess: ask the customer), options not available with what is chosen, the words it could not place, and the configuration so far for price_job.

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>",
      "phrases": "<phrases>"
    },
    "name": "match_options"
  }
}

Input Schema

NameRequiredDescriptionDefault
chosenNoWhat is already chosen, so options are filtered by it (finishes the chosen stock does not offer, combinations the supplier cannot make).
phrasesYesThe customer's words, one option each: ["velvet", "A5", "double sided", "500"].
product_idYes

Output Schema

NameRequiredDescriptionDefault
nextYes
valuesYes
matchesYes
missingYes
productYes
problemsYes
ambiguousYes
unmatchedYes
product_idYes
configurationYes
not_availableYes
ready_to_priceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / chosen / properties / stickerShape / description
      Added value: +"Where get_product has a sticker_shape field: an id from it. Stickers: square, circle or custom; labels: rectangle, circle or custom."
    • changedInput schema / properties / chosen / properties / stickerShape / enum
      Previous value: -[
      -  "square",
      -  "circle",
      -  "custom"
      -]New value: +[
      +  "square",
      +  "rectangle",
      +  "circle",
      +  "custom"
      +]
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), so the bar is low, but the description adds a genuinely important behavioral trait: it will not resolve ambiguity itself and every candidate is returned so the agent must ask the customer. It also discloses the four result categories (matches, ambiguous, unavailable-with-current-selection, unplaced words), which explains how partial failures surface rather than erroring.

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?

A single front-loaded sentence with the core operation stated first and the return categories enumerated after. It is dense but earns most of its words; the enumeration of return values is slightly redundant against the output schema.

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 3-parameter tool with a deep nested schema and an output schema, what an agent needs is present: what goes in, what comes out, and the ambiguity rule. The only real omission is the prerequisite relationship to get_product for sourcing valid size/stock/finishing ids.

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 67% and the nested chosen object is thoroughly documented in-schema, so the structured data does most of the work. The description adds only marginal meaning: one phrase per option, and implicit confirmation that product_id pins a single product. The phrase examples given ("velvet", "A5", "90 x 55mm") largely duplicate the schema's own example string.

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 transformation verb pair ("turns ... into option ids") with an explicit resource (customer phrases -> option ids for one product) and scopes it with "given what is already chosen." The naming of price_job as the downstream consumer makes it distinguishable from get_product (which supplies the option catalog) and price_job (which prices the result).

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

Usage Guidelines4/5

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

Usage context is clear: call it with the customer's raw words plus the current selection, and the resulting configuration feeds price_job. The bulleted ambiguity list is paired with an explicit directive ("never a guess: ask the customer"), which is operational guidance. It stops short of naming when-not-to-use or stating that get_product must be called first to obtain valid ids.

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