Skip to main content
Glama

Storewire Lite demo store

Compare products

compare_products
Read-onlyIdempotent

Compare 2 to 4 products side by side, as the store's compare page does: each product's card, then the spec rows by group with one value per product in the order given, whether each row differs and which value is better where a spec can be ranked. differences says whether any row differs. A product that cannot be compared (another category, past the limit, not found) is listed under rejected with the reason. url opens the same comparison on the store's website when it has a compare page.

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

Input Schema

NameRequiredDescriptionDefault
localeNoAnswer language: en (default en). Names, labels and URLs follow it.
productsYes2 to 4 products of one category: public_id, page URL or model number.

Output Schema

NameRequiredDescriptionDefault
urlYesThis comparison on the store's website; null when it has no compare page.
categoryYesThe category the comparison is in.
productsYesThe compared products, in the order given.
rejectedYes
truncatedNoPresent and true only when the answer outgrew the size budget and its last list items were left out; ask narrower to see them.
comparisonYesNull with fewer than two comparable products.
answer_typeNoWhat this answer is, for rendering.
differencesYesWhether any spec row differs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world behavior, so the safety profile is covered. The description adds real behavior beyond that: products from another category, past the limit, or not found are returned in a 'rejected' list with reasons rather than failing the call, output ordering follows input order, and 'url' only appears when the store has a compare page. That partial-success semantics is the kind of detail annotations cannot express.

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 the core action, and nearly every clause carries information an agent needs (limits, ordering, rejection, optional URL). It is one long run-on paragraph, and the standalone sentence 'differences says whether any row differs' is slightly redundant with the earlier 'whether each row differs', so a small trim is possible.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, yet the description still conveys the comparison semantics an agent needs to interpret results: grouping, per-product alignment, ranking, the differences flag, and the rejection path. With only two parameters at full coverage and a closed-world read-only profile, nothing material is missing for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so both parameters are already documented, and the baseline would be 3. The description goes further by tying the array to a cardinality and category constraint ('2 to 4 products of one category') and by explaining that output values follow 'the order given', which is meaning the schema does not carry.

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?

States a specific verb and resource ('Compare 2 to 4 products side by side') with the output shape spelled out: product cards, spec rows by group, per-row diff and better-value flags, rejected list, and a store URL. That is far more concrete than the title alone. It stops short of naming how it differs from search_products or get_product, so the sibling distinction is left to the reader's inference.

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

Usage Guidelines3/5

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

The constraints imply usage (2 to 4 products of one category, identifier forms accepted), but the description never says when to pick this over search_products or get_product for a single item. The '2 to 4' bound and the same-category rule give a partial picture, and nothing tells the agent the negative case at the tool-selection level.

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.