Skip to main content
Glama
vienneje
by vienneje

Add to Cart

add_to_cart

Add menu items to your cart, automatically clearing items from another restaurant and returning validated totals.

Instructions

Add one or more items to the cart. If items are from a different restaurant than the current cart, the cart is cleared first. Sends the full cart to foodpanda for price validation and returns updated totals.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesItems to add to cart
restaurant_idYesThe vendor code (e.g. 'p7nl')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses important side effects: the cart is cleared when items come from a different restaurant, the full cart is sent to foodpanda for price validation, and updated totals are returned. It does not mention failure modes, authentication, or quantity merging, but the core behavior is well covered.

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?

Two tightly written sentences with no filler. The action is front-loaded, followed by the key behavioral caveat and the outcome, making every word purposeful.

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?

The tool has no output schema and no annotations, yet the description covers the primary return ('updated totals') and the critical cross-restaurant behavior. It is sufficiently complete for an add-to-cart operation, though it could mention potential validation failures or item unavailability.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds meaningful parameter-related context by linking restaurant_id to the cart-clearing behavior and indicating that the items parameter supports multiple entries. This goes slightly beyond the schema's field-level descriptions.

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 clearly states the action ('Add') on a specific resource ('cart'), supports 'one or more items', and highlights a distinguishing behavior (clearing the cart when the restaurant changes). It is easily differentiated from siblings like get_cart, remove_from_cart, and place_order.

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 provides clear context for when to use this tool: whenever items need to be added to the cart. It also explains the specific scenario of switching restaurants and the resulting cart-clearing behavior. It does not explicitly list when-not-to-use or alternatives, but the context is unambiguous given the sibling names.

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