Skip to main content
Glama

Compare products

compare_products
Read-onlyIdempotent

Use this when the user wants to compare two to 5 named products from the catalog on their documented attributes. Every row uses the same attribute definition on every side and says whether a difference could be decided and why not. A cell with verification_state "unknown" is a gap in our research, never a missing feature. Do not use for products that are not in the catalog.

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": {
      "slugs": "<slugs>"
    },
    "name": "compare_products"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugsYesTwo to five product slugs from search_products.
differences_onlyNoOmit rows in which every product carries the same value. Undecided rows always stay.

Output Schema

NameRequiredDescriptionDefault
rowsYes
web_urlYes
contractYes
productsYes
total_rowsYes
decided_rowsYes
differences_onlyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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 the safety profile (readOnlyHint, idempotentHint, destructiveHint=false, closed-world), so the description correctly focuses elsewhere: it discloses the output guarantee that every row uses the same attribute definition on every side and records whether a difference could be decided and why not. The clarification that verification_state 'unknown' is a research gap rather than a missing feature is genuinely non-obvious behavioral context the agent would otherwise misread.

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?

Four short sentences, front-loaded with the trigger and closing with the exclusion; each carries information. Minor redundancy in repeating the 'two to 5' cardinality that the schema already enforces.

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, the description needn't explain return values, and it covers scope, the consistent-attribute-definition guarantee, and the 'unknown' interpretation rule. It leaves open edge behavior such as comparing products that differ in category or currency, which is why it is not a 5.

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 are documented there, including the differences_only behavior of keeping undecided rows. The description only restates the 2-5 cardinality already enforced by minItems/maxItems and never mentions differences_only, so it adds no parameter meaning beyond the schema – the 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?

The description states a specific verb and resource ('compare two to 5 named products from the catalog on their documented attributes') plus the comparison dimension (documented attributes). It also bounds scope with 'Do not use for products that are not in the catalog,' so an agent can distinguish this from search_products or get_product without opening a schema.

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 ('when the user wants to compare two to 5 named products') and an explicit exclusion ('Do not use for products that are not in the catalog'). The exclusion implicitly routes the agent to search_products, but the alternative is only named inside the schema, not in the description itself.

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