Skip to main content
Glama

rami_levy_reorder_from_history

Reorder frequent items from your purchase history by scanning recent orders and adding each recurring product to your cart at its median past quantity.

Instructions

Look at the last numOrders (default 10, max 50) real orders, find items that appear in at least minOccurrences (default 3) of them, and add each at its median past quantity. ADDS onto whatever is already in the cart — it does not replace it. Returns cartTotal (local estimate) and serverTotal (Rami Levy's own total — authoritative). ok:false with a transport reason means nothing changed. reason items_rejected means the server refused the listed products; they have been removed from the cart too, so tell the user and pick alternatives. If resetAfterOrder {orderId, createdAt} is present, an order was placed since the last sync, so the items from before it were treated as bought and cleared first; tell the user the cart started fresh after that order.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numOrdersNo
minOccurrencesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: it discloses the add-not-replace behavior, the distinction between local cartTotal and authoritative serverTotal, the 'nothing changed' ok:false case, the items_rejected removal side effect, and the resetAfterOrder scenario. This is excellent behavioral disclosure.

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 dense but every sentence carries essential operational information: the algorithm, the critical add-vs-replace distinction, return semantics, error handling, and reset behavior. It is front-loaded with the core action before the caveats.

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?

Given the tool's complexity and the absence of annotations or output schema, the description is remarkably complete. It covers parameters, defaults, side effects, return values, error reasons, and post-order state changes. Nothing essential is missing for an agent to call it safely and interpret results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides 0% description coverage, so the description must compensate. It explains both parameters with defaults (numOrders default 10 max 50, minOccurrences default 3) and their behavioral meaning. No parameter meaning is left unexplained.

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 operation (reorder items from past order history), names the exact algorithm (last numOrders, minOccurrences threshold, median quantity), and explicitly contrasts itself with replacing the cart. This clearly distinguishes it from siblings like add_item or clear_cart.

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?

The description gives clear context for when to call it: the user wants items that recur across recent orders. It also clarifies that it adds to the existing cart rather than replacing it, which is important for choosing it over clear_cart or add_item. It does not explicitly name alternatives, but the usage context is clear enough.

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