Skip to main content
Glama

Compare products side by side

compare_products
Read-onlyIdempotent

Compares two or more products found in a product search, side by side, taking their ids from the search results. It returns the attributes the products share, such as price, brand, color and material, with each product's value, so a shopper can tell them apart. It lines up only the attributes at least one product gives, so products with few details still compare cleanly. For follow-up calls in this conversation, send the visitorId returned by a previous result unchanged. Omit it on the first call; do not invent one.

Input Schema

NameRequiredDescriptionDefault
idsYesNobi variant ids, each from a product search result.
visitorIdNoFor follow-up calls in this conversation, send the visitorId returned by a previous result unchanged. Omit it on the first call; do not invent one.

Output Schema

NameRequiredDescriptionDefault
visitorIdNoFor follow-up calls in this conversation, send the visitorId returned by a previous result unchanged. Omit it on the first call; do not invent one.
comparisonYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / visitorId
      Added value: +{
      +  "description": "For follow-up calls in this conversation, send the visitorId returned by a previous result unchanged. Omit it on the first call; do not invent one.",
      +  "format": "uuid",
      +  "maxLength": 36,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedOutput schema / properties / visitorId
      Added value: +{
      +  "description": "For follow-up calls in this conversation, send the visitorId returned by a previous result unchanged. Omit it on the first call; do not invent one.",
      +  "format": "uuid",
      +  "maxLength": 36,
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / ids / description
      Previous value: -"The ids of the products, each from a product search result."New value: +"Nobi variant ids, each from a product search result."
    • changedInput schema / properties / ids / items / description
      Previous value: -"The ids of the products, each from a product search result."New value: +"Nobi variant ids, each from a product search result."
  3. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive behavior, and the description adds genuinely new traits: it explains that the result lines up the union of attributes so sparse products still compare, and that visitorId must be echoed unchanged on follow-ups and never invented. These are behaviors not derivable from the annotations.

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 compare action and result shape, then the session rule. Slightly redundant: the visitorId sentence is repeated verbatim from the schema description rather than adding new framing, but nothing is truly wasteful.

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?

Covers prerequisite (ids from search), result semantics (shared attributes with each product's value), edge handling (sparse products), and session continuity. An output schema exists, so return formatting needn't be restated.

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 the schema already states that ids are Nobi variant ids from a product search result and carries the same visitorId wording. The description adds no syntax or constraint detail beyond that baseline, so a 3 is appropriate.

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 — compares products side by side — and pins the scope to 'two or more' products drawn from a search. It is easily separable from siblings like search_products and get_product_details.

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?

Gives clear context: use it on ids that came out of a product search, and describes the first-vs-follow-up call distinction via visitorId. It does not explicitly contrast with find_alternatives or get_product_details, so an agent must infer when comparison beats alternatives or full details.

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