Skip to main content
Glama

Bikefuchs — Bike Parts Price Comparison

Optimize Shopping Cart

optimize_cart
Read-onlyIdempotent

Find the cheapest way to buy multiple products together: computes the optimal split across shops — which items to order from which shop — accounting for each shop's shipping costs and free-shipping thresholds, and returns the lowest achievable total including shipping. Takes an array of EAN barcodes. For accurate results, call get_best_price for each EAN first, then call optimize_cart.

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

Input Schema

NameRequiredDescriptionDefault
eansYesArray of EAN barcodes (8–14 digit numbers as strings, e.g. '4524667749493'). NOT URLs.
countryNoCountry for pricing and shipping (DE or AT, default DE)DE

Output Schema

NameRequiredDescriptionDefault
guaranteeNo
disclosureNo
optimizationYes
savings_infoNo
guarantee_noteNo
stale_cache_warningNo
excluded_stale_offersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / guarantee
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "lines": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "competitor_price": {
      +            "type": "number"
      +          },
      +          "competitor_shipping_shown": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "competitor_shop": {
      +            "type": "string"
      +          },
      +          "competitor_url": {
      +            "type": "string"
      +          },
      +          "ean": {
      +            "type": "string"
      +          },
      +          "matched_price": {
      +            "type": "number"
      +          },
      +          "own_price": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "ean",
      +          "own_price",
      +          "matched_price",
      +          "competitor_shop",
      +          "competitor_price",
      +          "competitor_shipping_shown"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "reason": {
      +      "type": "string"
      +    },
      +    "shipping": {
      +      "type": "number"
      +    },
      +    "shipping_adjustment": {
      +      "type": "number"
      +    },
      +    "shop": {
      +      "type": "string"
      +    },
      +    "total": {
      +      "type": "number"
      +    },
      +    "unadjusted_total": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "shop",
      +    "reason",
      +    "total",
      +    "unadjusted_total",
      +    "shipping_adjustment",
      +    "lines"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / guarantee_note
      Added value: +{
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedOutput schema / properties / excluded_stale_offers
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "count": {
      +      "type": "number"
      +    },
      +    "shops": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "count",
      +    "shops"
      +  ],
      +  "type": "object"
      +}
  3. Changed1 schema field changed
    • addedOutput schema / properties / disclosure
      Added value: +{
      +  "type": "string"
      +}
  4. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds real behavioral context beyond that: shipping costs and free-shipping thresholds are factored in, and the returned total includes shipping. It stops short of noting constraints like the 20-item cap or runtime cost of the optimization.

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?

Two sentences, front-loaded with the outcome (cheapest split including shipping) before the input format and prerequisite. Every clause carries information; nothing is redundant.

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?

An output schema exists, so return values need no explanation, and the annotations cover the safety profile. The description supplies what structured data can't: the shipping-aware optimization semantics and the prerequisite call chain. Nothing an agent needs in order to invoke it correctly appears to be 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 the baseline is 3. The description only restates that the input is an array of EAN barcodes and adds nothing about the country parameter or how country affects pricing and shipping beyond what the schema already documents.

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?

"Find the cheapest way to buy multiple products together" plus "computes the optimal split across shops" states a specific verb and resource with scope. It clearly distinguishes itself from the single-product sibling get_best_price, which is named later in the text.

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 an explicit prerequisite sequence: call get_best_price for each EAN first, then call optimize_cart. That is clear context for when to reach for this tool, though it doesn't state any when-not conditions (e.g. single-item carts) explicitly.

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.