Skip to main content
Glama

Add a shopping item

shopping_add

Add an item to a flat’s shared shopping list with an optional quantity and notify other members, keeping household purchases coordinated.

Instructions

Add one item to the flat's shared shopping list, optionally with a quantity. Use it when something needs to be bought; to tick off an existing item use shopping_set_bought, and to track household stock use inventory_add. Every other member gets a notification (a system notice and a push; the caller is excluded). Fails with 409 shopping_item_duplicate when an open item with the same name already exists, so read shopping_list first instead of retrying. Rate limited per member (too_many_requests with retry_after_s). Returns the created item.

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": {
      "name": "<name>"
    },
    "name": "shopping_add"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesItem name as shown on the list, for example "Oat milk". Compared to open items to detect duplicates.
boughtNoSet true to record an item that was already bought, so it lands directly in the bought history. Leave false for something still to buy.
wgCodeNoShare code of the flat (code from wg_list). Leave it out when the account belongs to one flat.
quantityNoFree-text amount shown next to the name, for example "2" or "1 kg". Omit when no amount is needed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.1
    • addedInput schema / properties / bought / description
      Added value: +"Set true to record an item that was already bought, so it lands directly in the bought history. Leave false for something still to buy."
    • addedInput schema / properties / name / description
      Added value: +"Item name as shown on the list, for example \"Oat milk\". Compared to open items to detect duplicates."
    • addedInput schema / properties / quantity / description
      Added value: +"Free-text amount shown next to the name, for example \"2\" or \"1 kg\". Omit when no amount is needed."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, it discloses the notification side effect on every other member (and that the caller is excluded), the exact failure mode 409 shopping_item_duplicate, per-member rate limiting with too_many_requests and retry_after_s, and that the created item is returned. These are non-obvious operational behaviors an agent could not infer from readOnlyHint/idempotentHint/destructiveHint alone.

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?

Purpose is front-loaded and every sentence carries signal: alternatives, side effects, error handling, rate limits, return value. It is dense with parenthetical asides and runs long for a simple add operation, but there is no filler to cut.

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 write tool with side effects and no output schema, the definition covers the mutation, who is notified, duplicate semantics, throttling, and the return value. Nothing an agent needs to invoke it correctly or handle failures 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 description coverage is 100%, so each parameter's meaning, format, and examples are already documented in the schema; the description only echoes the optional quantity and the name-based duplicate comparison. Baseline 3 applies because the description adds little parameter meaning beyond the structured fields.

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 concrete verb and resource ('Add one item to the flat's shared shopping list') plus the optional quantity, and the second sentence explicitly distinguishes it from shopping_set_bought and inventory_add. An agent can identify the tool's job and its neighbors without opening a 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 states the trigger ('when something needs to be bought'), names two alternatives with the conditions that select them (ticking off an item, tracking household stock), and adds a recovery rule ('read shopping_list first instead of retrying') for the duplicate case. When-to-use, when-not-to-use, and alternatives are all explicit.

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