Skip to main content
Glama

Compare products

dr_compare
Read-onlyIdempotent

Compare 2–5 products side by side on price, stock, rating, properties, ingredient amounts, and dosage to find the lowest-priced in-stock item and shared ingredients.

Instructions

Compare 2 to 5 products side by side: price, stock, rating, properties, ingredient amounts and dosage.

cheapest is the lowest-priced in-stock id; common_ingredients are shared components. Amounts are per each product's ingredients_per, which can differ.

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": "dr_compare"
  }
}

Input Schema

NameRequiredDescriptionDefault
productsYes2-5 ids or paths.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.0
    • changedInput schema / properties / products / description
      Previous value: -"2-5 product ids or paths from dr_search."New value: +"2-5 ids or paths."
    • changedInput schema / properties / products / items / description
      Previous value: -"A product id (e.g. 2084), or its path/URL from dr_search (e.g. /products/cosmetic-sunscreen-for-all-skin-types-1379/cream-sunscreen-cream-spf50-2084)."New value: +"Product id (2084) or path/URL from dr_search."
  2. First observedv0.1.1

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, open-world behavior, so the safety profile is covered. The description adds genuinely new context by explaining return semantics: `cheapest` is the lowest-priced in-stock id, `common_ingredients` are shared components, and amounts are normalized per each product's `ingredients_per`, which can differ. The caveat about differing `ingredients_per` is a real behavioral warning an 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?

Two short paragraphs, front-loaded with the purpose, followed by a compact note on response-field semantics. No filler. The only minor cost is that the cardinality restatement duplicates the schema, but it is brief enough not to be noise.

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 no output schema, the description carries the burden of explaining return values, and it does so for the two least obvious fields (`cheapest`, `common_ingredients`) plus the amount-normalization rule. It stops short of describing the full response shape or error behavior for invalid ids, but it is adequate for a read-only comparison tool.

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%, so the schema already documents the products array, its 2-5 bounds, and that ids or dr_search paths are accepted. The description's '2 to 5 products' merely restates the schema bounds and adds no new parameter-level detail. 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?

States a specific verb and resource ('Compare 2 to 5 products side by side') and enumerates exactly what dimensions are compared (price, stock, rating, properties, ingredient amounts, dosage). This differentiates it clearly from single-resource siblings like dr_product and dr_cheapest without needing to name them.

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-to-5 cardinality and 'side by side' framing imply when this tool fits, but there is no explicit when-to-use/when-not guidance and no routing to alternatives such as dr_product for a single item or dr_cheapest for a price-only lookup. Usage is inferred rather than stated.

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