Skip to main content
Glama

Similar and complementary products

kh_similar
Read-onlyIdempotent

List similar or complementary products with prices and stock to replace an out-of-stock or expensive item; filter by availability using a product slug or ID.

Instructions

List alternatives to a product (about 20) or the products the shop pairs with it, with prices and stock.

Use when a product is out of stock or too expensive.

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": "<product>"
    },
    "name": "kh_similar"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNocomplementary = shop pairings (often empty).similar
productYesSlug from a list reply (e.g. 'golden-rose-sheer-bright-lipstick-112222') or numeric id.
in_stock_onlyNoOnly orderable products.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.0
    • changedInput schema / properties / in_stock_only / description
      Previous value: -"Only products that can be ordered now."New value: +"Only orderable products."
    • changedInput schema / properties / kind / description
      Previous value: -"similar = alternatives; complementary = products the shop pairs with it (often empty)."New value: +"complementary = shop pairings (often empty)."
    • changedInput schema / properties / product / description
      Previous value: -"Slug from kh_search / kh_browse (e.g. 'golden-rose-sheer-bright-lipstick-112222') or numeric id."New value: +"Slug from a list reply (e.g. 'golden-rose-sheer-bright-lipstick-112222') or numeric id."
  2. Changed7 schema fields changedv0.2.0
    • removedInput schema / properties / in_stock_only / title
      Removed value: -"In Stock Only"
    • changedInput schema / properties / kind / description
      Previous value: -"similar = alternatives to this product; complementary = products the shop pairs with it (routine)."New value: +"similar = alternatives; complementary = products the shop pairs with it (often empty)."
    • removedInput schema / properties / kind / title
      Removed value: -"Kind"
    • changedInput schema / properties / product / description
      Previous value: -"Product slug from kh_search / kh_browse (e.g. 'golden-rose-sheer-bright-lipstick-112222') or the numeric product id (e.g. '112222')."New value: +"Slug from kh_search / kh_browse (e.g. 'golden-rose-sheer-bright-lipstick-112222') or numeric id."
    • removedInput schema / properties / product / title
      Removed value: -"Product"
    • removedInput schema / title
      Removed value: -"kh_similarArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "title": "kh_similarDictOutput",
      -  "type": "object"
      -}New value: +null
  3. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, open-world, and non-destructive, so the safety profile is covered. The description adds real behavioral context beyond that: an approximate result count (~20), the fact that 'complementary' pairings are often empty, and that results carry prices and stock.

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?

Two short sentences, zero filler. The primary behavior (what is listed, how many, with what fields) is front-loaded ahead of the usage condition, which is the right order for an agent scanning for capability first.

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 three-parameter read tool with no output schema, the description covers purpose, trigger, result volume, and the main caveat (empty complementary results). Minor gaps remain around ordering or why a result set might be shorter than ~20, but nothing needed to call it correctly is missing.

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 each parameter already carries its own description, including the enum values and the slug format, so the schema does the heavy lifting. The description adds only the approximate result volume and the note that pairings can be empty, which is context rather than parameter semantics. 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?

The description states a specific verb and resource ('List alternatives to a product') and covers both modes (similar vs. shop pairings) plus what is returned (prices and stock). It is clear on its own, but does not explicitly differentiate itself from siblings like kh_search or kh_find_cheapest, which an agent could plausibly confuse it with.

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?

It gives an explicit trigger: 'Use when a product is out of stock or too expensive.' That is a concrete when-to-use condition rather than an implied one. It stops short of naming an alternative tool for the case where the product is in stock and affordable, so the selection boundary is only half-drawn.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.