Skip to main content
Glama

Empty cart

clear_cart
DestructiveIdempotent

Removes all products from the cart in one step using the website's remove-all action and confirms it is empty. Call only when the user asks to empty the whole cart; pass confirm true.

Instructions

Remove every product from the cart in one step, with the website's own "remove all" action, and confirm the cart is empty. Only when the user asks to empty or clear the whole cart; pass confirm: true. To remove some products, use remove_cart_item. If the result has mutation.outcome "unknown", the cart may have changed: call get_cart before any further change and never repeat the request automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmYesMust be true: the user asked to empty the whole cart.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.10.0

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations (destructive/idempotent/openWorld) it discloses that the operation uses the site's own 'remove all' action, that it verifies the empty state, and how to handle the ambiguous failure mode: on mutation.outcome 'unknown', call get_cart before any further change and never auto-retry. That is exactly the recovery guidance an agent needs and nothing in the annotations conveys it.

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?

Three dense sentences, front-loaded with the action and scope, then the gating condition and alternative, then the failure-mode caveat. No filler; every clause carries actionable information.

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 a destructive mutation, sangled required argument, and an output schema present, the description covers the intent gate, the sibling routing, and the ambiguous-outcome recovery path. Nothing needed to invoke it safely is missing.

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% and the schema already documents confirm's const:true requirement, so the baseline is 3. The description adds the intent condition that makes the flag meaningful ('Only when the user asks to empty or clear the whole cart'), tieing the parameter to a user-facing trigger rather than restating the type.

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?

States a specific verb and resource ('Remove every product from the cart') plus scope ('in one step', 'every product'), and explicitly distinguishes itself from remove_cart_item for partial removals. An agent can select it correctly without opening any 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?

Gives an explicit gate ('Only when the user asks to empty or clear the whole cart'), the required argument ('pass confirm: true'), and names the alternative for the adjacent case ('To remove some products, use remove_cart_item'). When-to-use, when-not, and sibling routing are all present.

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