Skip to main content
Glama

add_to_cart

Add a menu item to an existing cart using restaurant and menu item IDs, with optional quantity, special instructions, and add-ons.

Instructions

add an item to an existing cart.

Args: cart_id: The cart ID to add to restaurant_id: The restaurant ID for the item menu_item_id: The menu item ID to add quantity: Number of this item (default 1) special_instructions: Special preparation instructions options: List of selected options/add-ons, each with {id, quantity}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cart_idYes
restaurant_idYes
menu_item_idYes
quantityNo
special_instructionsNo
optionsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavior. It states the basic action but does not reveal side effects (e.g., whether duplicate items increment quantity, error conditions like mismatched restaurant_id, or if the cart must be in a certain state). Output schema exists but description lacks behavioral context.

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 concise: a one-line summary followed by an Args list. Each parameter explanation is short and to the point. No unnecessary text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

While the description explains parameters, it lacks contextual completeness for a mutation tool. It does not mention prerequisites (e.g., cart must exist, restaurant consistency) or what happens on conflict (e.g., item already in cart). Output schema may partially compensate, but the description should provide more usage context.

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?

With 0% schema description coverage, the description provides clear semantics for all 6 parameters, including the structure of the 'options' parameter (list of objects with id and quantity). This adds significant value beyond the schema's bare types and defaults.

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 'add an item to an existing cart,' specifying the action and the target resource. It distinguishes from sibling tools like create_cart (creates a new cart) and remove_from_cart (removes an item).

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 usage (adding items to an existing cart) but does not explicitly state when to use this tool versus alternatives like update_cart_item or when a cart must be created first. No guidance on when not to use it.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sawyershoemaker/grubhub-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server