Skip to main content
Glama

compare_products

Read-onlyIdempotent

Compare 2 to 5 products side-by-side with normalized attribute table and best-value recommendation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
product_idsYesArray of product IDs to compare (2-5)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
productsYes
bestValueYes
commonFieldsYes
comparisonTableYes
recommendation_provenance_warningNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / properties / bestValue / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "productId": {
      -        "type": "string"
      -      },
      -      "reason": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "productId",
      -      "reason"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": true,
      +    "properties": {
      +      "productId": {
      +        "type": "string"
      +      },
      +      "reason": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "productId",
      +      "reason"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / products / items / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / properties / products / items / properties / attributes / items / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / properties / products / items / properties / rating_provenance / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "note": {
      -        "type": "string"
      -      },
      -      "origin": {
      -        "const": "merchant",
      -        "type": "string"
      -      },
      -      "strength": {
      -        "const": "claimed",
      -        "type": "string"
      -      },
      -      "verified": {
      -        "const": false,
      -        "type": "boolean"
      -      }
      -    },
      -    "required": [
      -      "origin",
      -      "strength",
      -      "verified",
      -      "note"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": true,
      +    "properties": {
      +      "note": {
      +        "type": "string"
      +      },
      +      "origin": {
      +        "const": "merchant",
      +        "type": "string"
      +      },
      +      "strength": {
      +        "const": "claimed",
      +        "type": "string"
      +      },
      +      "verified": {
      +        "const": false,
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "origin",
      +      "strength",
      +      "verified",
      +      "note"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Added
  3. Removed
  4. Changed4 schema fields changed
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties
      Added value: +{
      +  "product_ids": {
      +    "description": "Array of product IDs to compare (2-5)",
      +    "items": {
      +      "type": "string"
      +    },
      +    "maxItems": 5,
      +    "minItems": 2,
      +    "type": "array"
      +  }
      +}
    • addedInput schema / required
      Added value: +[
      +  "product_ids"
      +]
  5. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover readOnlyHint, idempotentHint, openWorldHint, and destructiveHint. The description adds meaningful behavioral context by specifying that it produces a normalized attribute table and a best-value recommendation, going beyond the minimal safety profile. It does not contradict any annotations.

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?

The description is a single, tightly worded sentence that front-loads the action ('Compare') and immediately states the key constraints and outputs. Every word earns its place with no redundancy or filler.

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 a single parameter, full schema coverage, annotations covering the safety profile, and an output schema present, the description gives enough for correct invocation. It could have mentioned that the product IDs must reference existing products, but this is a minor gap given the output schema will define the result structure.

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 the parameter description already states 'Array of product IDs to compare (2-5)'. The tool description repeats the 2-5 range but does not add extra meaning about ID formats, source, or preprocessing requirements, so the schema carries the weight.

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 ('Compare'), a specific resource ('products'), an explicit range ('2 to 5'), and the output type ('normalized attribute table and best-value recommendation'). This clearly differentiates it from single-product tools like get_product_details and search tools like search_products.

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 description implies when to use the tool—when comparing 2 to 5 products side-by-side—but does not explicitly mention alternatives, exclusions, or when not to use it. It provides no direct routing guidance against sibling tools like get_product_details or search_products_enriched.

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