Skip to main content
Glama
catalog-mcp

catalog-mcp

by Yehiak

Compare products

compare_products
Read-onlyIdempotent

Compare 2-6 products side by side on price, rating, brand, and shared specs, and rank them by cost, review-adjusted rating, and review volume.

Instructions

Compare 2-6 products side by side: price, rating, brand and every spec that at least two of them list.

Also names the cheapest, best-rated (adjusted for rating count) and most-reviewed product.

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_ids": "<product_ids>"
    },
    "name": "compare_products"
  }
}

Input Schema

NameRequiredDescriptionDefault
max_specsNoMaximum number of spec rows beyond the core fields.
product_idsYes2 to 6 distinct product ids to compare.

Output Schema

NameRequiredDescriptionDefault
specsYesCore fields first, then spec keys listed by at least two of the products.
productsYes
cheapest_idYes
best_rated_idYesHighest rating after shrinking toward 4.0 by rating count, so a 5.0 from 2 ratings does not win.
most_reviewed_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, closed-world, non-destructive), so the description's real contribution is behavioral: it discloses the spec-inclusion rule ('every spec that at least two of them list') and the ranking outputs, including that best-rated is adjusted for rating count. That adjustment detail is a genuine insight an agent could not derive from the annotations or schema.

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 sentences with no filler: the comparison scope and fields come first, the computed highlights second. Every clause carries information, and nothing duplicates the schema verbatim beyond the necessary range constraint.

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 does not need to document return values, and it appropriately focuses on comparison scope, spec threshold and computed rankings. Minor gaps remain, such as behavior when products share no common specs or when fields like price are missing for one item.

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 the baseline is 3, but the description adds meaning by defining the core fields as price, rating and brand, which is exactly the boundary the max_specs parameter operates against ('beyond the core fields'). It does not add format or syntax detail for product_ids, which the schema already handles with a pattern and example.

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 (compare) with an explicit scope constraint (2-6 products, side by side) and enumerates the compared dimensions (price, rating, brand, specs). This clearly separates it from the single-product sibling get_product and from search_products, since the operation is a multi-item aggregation rather than a lookup or query.

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 2-6 range implies usage, but it only restates the schema's minItems/maxItems constraint rather than advising when to reach for this tool over get_product or search_products. There is no when-not guidance and no named alternative, so an agent must infer the fit from the operation itself.

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