Skip to main content
Glama

Recommend alternative products

recommend_alternatives
Read-onlyIdempotent

Find alternatives to an Alza product by code, ranking by cheaper price, same brand, or better customer rating; falls back to category search when no listed alternatives match.

Instructions

Find alternatives to one product ("something like this but cheaper / better / same brand"). Candidate pool = Alza's own alternatives list for the product (mobile API, keyed by the numeric commodity id taken from the product URL); if that list is empty, or nothing in it survives the mode filter, falls back to a same-category search_products (poolSource says which was used). Heuristics: cheaper = strictly lower price, cheapest first; same-brand = brand match (source brand vs. the candidate's name), then rating desc, price asc; better-specs = rating >= source rating (unrated dropped), then rating desc, price asc — it ranks by customer rating, it does not compare spec tables, so shortlist then compare with get_product params. The source product is always excluded. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesAlza product code of the product to find alternatives for, e.g. 'RI054b5'. Same as the `code` from `search_products`.
modeNoRanking mode. 'cheaper': strictly lower price than the source, cheapest first. 'same-brand': same brand as the source, best rating first then lower price. 'better-specs': rated at least as high as the source (unrated excluded), best rating first then lower price — a rating heuristic, NOT a spec-table comparison. Omit to get Alza's own alternatives order.
limitNoMaximum number of alternatives to return. Default 5, max 20.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo
sourceYesScraped product detail (JSON-LD sourced; stable fields listed, rest passthrough).
poolSourceYes
alternativesYes
candidatesConsideredYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, openWorldHint), but the description goes well beyond: it discloses the candidate pool source, the fallback mechanism, the `poolSource` output field, deterministic ranking rules per mode, and the guarantee that the source product is always excluded.

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-loads the purpose and the pool/fallback logic before the heuristics, and every clause carries information. It is dense to the point of being a single run-on paragraph, which slightly hurts scannability.

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?

For a tool with an output schema and full annotation coverage, the description supplies everything an agent needs: what the pool is, how fallback works, how each mode ranks, and the exclusion rule. Nothing material is missing.

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 `code`, `mode`, and `limit` in detail. The description adds marginal value by clarifying that the underlying pool is keyed by a numeric commodity id taken from the product URL while the parameter is the Alza code, but this is largely restatement of enum semantics.

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+resource ('Find alternatives to one product') and immediately scopes it with the user-intent framing ('something like this but cheaper / better / same brand'). It is clearly distinguishable from siblings like search_products, compare_products, and get_product.

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

Usage Guidelines5/5

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

Names the alternative paths explicitly: falls back to same-category search_products when the Alza list is empty, and instructs the agent to shortlist here then compare with get_product `params`. The mode-selection conditions ('cheaper' / 'same-brand' / 'better-specs') are each defined with their trigger.

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