Skip to main content
Glama

add_recipe_to_cart

Destructive

Adds a recipe's products to a chosen store's cart after user confirmation, with options to skip, swap, or include items; it never orders or pays.

Instructions

Put a recipe's products in one store's cart, as get_recipe shows them. ASK THE HUMAN FIRST: show the list from get_recipe and get a yes. Never orders or pays. Adds to what is already in the cart, so calling it twice adds twice. have_at_home items (salt, oil) are left out unless named in include. skip leaves out ingredients; swap maps an ingredient (or product id) to one of its alternatives' product ids. Names: ingredient or product id. Returns before/added/after per product, the skipped items and the new cart. Check ok per product: a store can refuse some lines; tell the human which ones failed. BilkaToGo: one pack per product; persons is not used.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "store": "<store>",
      "recipe": "<recipe>"
    },
    "name": "add_recipe_to_cart"
  }
}

Input Schema

NameRequiredDescriptionDefault
skipNoIngredient names or product ids to leave out.
swapNoIngredient name or product id → the alternative's product id.
storeYesOne store: "nemlig", "bilkatogo" or "rema1000".
recipeYesThe recipe's link or id, as given to get_recipe.
includeNo`have_at_home` items to buy anyway, e.g. ["olie"].
personsNoPeople to cook for, 2-12. Leave out for the recipe's own.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.7.1
    • addedInput schema / properties / include / description
      Added value: +"`have_at_home` items to buy anyway, e.g. [\"olie\"]."
    • addedInput schema / properties / persons / description
      Added value: +"People to cook for, 2-12. Leave out for the recipe's own."
    • addedInput schema / properties / recipe / description
      Added value: +"The recipe's link or id, as given to get_recipe."
    • addedInput schema / properties / skip / description
      Added value: +"Ingredient names or product ids to leave out."
    • addedInput schema / properties / store / description
      Added value: +"One store: \"nemlig\", \"bilkatogo\" or \"rema1000\"."
    • addedInput schema / properties / swap / description
      Added value: +"Ingredient name or product id → the alternative's product id."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=false and openWorldHint=true; the description adds genuinely new behavioral facts on top: human confirmation requirement, additive non-idempotent semantics ('calling it twice adds twice'), the have_at_home/skip/swap exclusion rules, partial per-product failure with an 'ok' flag, and the BilkaToGo one-pack constraint. What is missing is anything about auth or rate limits, which is minor here.

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?

The safety-critical instruction is front-loaded and each sentence carries a distinct rule; nothing is padding. It is dense and wraps mid-sentence in places, which slightly hurts scanability, but the information density justifies the length.

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 six-parameter, non-idempotent mutation tool with no output schema, the description covers invocation prerequisites, exclusion logic, partial-failure handling and the shape of the return (before/added/after, skipped items, new cart). Nothing an agent needs to call it correctly is absent.

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 coverage is 100%, so baseline is 3; the description earns above that by explaining conditional semantics the schema does not — that `include` only matters for have_at_home items, that `skip` omits whole ingredients while `swap` redirects an ingredient to an alternative's product id, and that `persons` is ignored for BilkaToGo. The naming convention (ingredient name or product id) is also clarified.

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 first sentence names a specific verb and resource ('Put a recipe's products in one store's cart') and scopes it to what get_recipe returns, which cleanly separates it from read siblings like get_cart or search_products. An agent can tell it is the single write path from recipe to cart without opening the schema.

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?

It explicitly directs the agent to show the get_recipe output and obtain a human 'yes' before calling, and states 'Never orders or pays' as a hard boundary. It also flags the double-call consequence, which is the key when-not-to-repeat guidance.

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