Skip to main content
Glama

Bite

Refine a compared basket

refine_basket

Creates a new basket snapshot with a new basket_id and re-compares prices without changing the original basket or re-searching unchanged items. The returned ID identifies the new snapshot for subsequent edits, saving and handoff. Supports item removal, product swaps, additions, chain restrictions and changes to how many chains the basket splits across. Chain totals include the chain's delivery fee, shown separately as deliveryFee (null means the fee is unknown and that total may exclude delivery). favorite: exact means that chain's product is one of the user's Bite favorites for the item. A chain without it has no favorite field and uses Bite's usual match. Signed in, the user's saved cards and clubs (add_benefit_program) are applied and the result lists which chains used card prices; otherwise totals are public prices and no card or club is mentioned.

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

Input Schema

NameRequiredDescriptionDefault
addNoItems to add to the basket.
swapNoReplace an item with another product, e.g. {"item":"חלב","replacement":"חלב 1% תנובה"}.
itemsNoEdits by item id (used by the Bite card): set quantity, pick a product for every chain, or remove.
chainsNoOnly consider these chains (ids or names, e.g. ["shufersal","rami-levy"]).
localeNoLanguage of a "message" reply. Default "he".
removeNoItems to drop, as the user named them.
basket_idYesThe basketId returned by compare_basket, compare_my_list or a previous refine_basket; pass it here as basket_id.
max_chainsNoMost chains to split across. Default 2.
reply_formatNo"message" returns a short ready-to-send chat message with the main numbers instead of the full card data. Default "card".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=false), the description discloses that the original basket is untouched and a new snapshot is created, that the returned ID is the handle for later edits, and that chain totals include delivery fees with deliveryFee=null meaning an unknown fee. It also explains favorite-match semantics per chain and that signed-in users get saved cards and clubs (add_benefit_program) applied while anonymous users get public prices with no card or club mention. This is unusually rich 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and snapshot semantics are front-loaded in the first sentence, followed by the returned-ID contract, the supported edit surface, and then output/pricing semantics. Every sentence carries information that is not in structured fields, and because there is no output schema, the deliveryFee and favorite notes are justified. It is a single dense block with no structural breaks, which makes it harder to scan than it could be.

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?

With no output schema, the description fills the gap by explaining what the returned ID is for and what the pricing output contains (chain totals with delivery fees, deliveryFee nullability, favorite-exact matching). It also covers the auth-dependent variation and confirms the defaults implied by the schema (max_chains 2, locale he, reply_format card). For a nine-parameter mutation tool, an agent has what it needs to call it correctly.

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% for all nine parameters, so the schema already documents add, swap, remove, items, chains, max_chains, locale and reply_format. The description only lightly reinforces these ('item removal, product swaps, additions, chain restrictions and changes to how many chains the basket splits across') without adding syntax or constraint detail beyond the schema. Its extra detail (deliveryFee, favorite) is output semantics rather than parameter semantics, so the baseline 3 applies.

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?

The description opens with a specific verb and resource: it creates a new basket snapshot with a new basket_id and re-compares prices. It also states the key differentiator from a plain comparison ('without changing the original basket or re-searching unchanged items'), so an agent can tell what it does. It stops short of naming the sibling tool (compare_basket) as the alternative, leaving that inference to the schema instead of the prose.

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?

It gives clear context for when this tool is the right choice: when editing an existing compared basket while preserving the original and avoiding a re-search, and when a new snapshot ID is needed for further edits, saving or handoff. The supported edit types (removal, swaps, additions, chain restrictions, max_chains) are enumerated. There are no explicit exclusions or named alternatives, which keeps this below a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources