Skip to main content
Glama

Добавление в корзину

grocery_add_to_cart

Add products to a grocery cart using a JSON list of item IDs and quantities, with app_id and point_id from grocery_stores to keep cart and checkout on the same store.

Instructions

Добавить товары в корзину. items = JSON [{id, count}, ...]. app_id/point_id — из grocery_stores() (обязательны). Запомни их — тот же магазин нужен для grocery_cart и grocery_checkout.

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

Input Schema

NameRequiredDescriptionDefault
itemsYes
app_idNo
point_idNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare this is a non-read-only, non-destructive, open-world mutation, so the safety profile is covered. The description adds the prerequisite dependency on grocery_stores() and the state that carries forward, but it never says whether an item already in the cart has its count merged, overwritten, or duplicated — the key behavioral question for an "add" tool that sits beside a "set" tool.

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?

Four short sentences, front-loaded with the action and then the payload then the prerequisites; every sentence carries information. The line-wrapping and abrupt "Запомни их" phrasing make it slightly choppy but nothing is wasted.

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?

An output schema exists, so return values need not be explained, and the store-identifier prerequisite is well covered. What is missing for a cart-mutation tool is duplicate-handling semantics and a note on failure modes, and the required-vs-default discrepancy for app_id/point_id is left unexplained.

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 0% (all three properties are bare string titles), so the description carries the burden and largely succeeds: it spells out that items is a JSON array of {id, count} objects and where app_id/point_id come from. It omits the meaning of a single item's id namespace and leaves app_id/point_id marked "required" while the schema gives them defaults of empty string, an inconsistency the description does not resolve.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Добавить товары в корзину") plus the payload shape, so the agent knows exactly what the call does. It does not distinguish itself from the sibling grocery_set_cart, which is the closest semantic neighbour for cart mutation, so it stops short of a 5.

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?

Gives real chaining guidance: app_id/point_id must come from grocery_stores() and must be reused for grocery_cart and grocery_checkout, which tells the agent how this call fits into a multi-step flow. There is no explicit "do not use this when…" clause and no routing away from grocery_set_cart.

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