Skip to main content
Glama

NotRobophobic shop

Apply Discount To Basket

apply-discount-to-basket

Apply a discount code to a basket. Returns the updated basket with the discount reflected in the totals.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe discount code to apply.
basket_tokenYesThe basket token from create-basket.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior2/5

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

There are no annotations, so the description carries full behavioral disclosure burden. It states that the tool returns an updated basket, but it does not disclose side effects such as whether an existing discount is replaced, whether the operation is idempotent, or what happens with an invalid code. For a state-changing tool this is a meaningful gap.

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 short sentences with no filler. The core action is front-loaded, and the return behavior is stated economically.

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?

For a simple two-parameter tool, the description covers the basic action and return value. However, with no annotations and no output schema, it leaves important operational details unstated, such as error behavior and mutation semantics, so it is only minimally complete.

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 parameters are already documented. The description adds no additional meaning beyond the schema, and the baseline of 3 applies.

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 description uses a specific verb ('Apply') and resource ('discount code to a basket'), and clearly states the return value. This makes the tool's purpose obvious and distinguishable from sibling basket operations like add-to-basket or remove-from-basket.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool should be used when a discount code needs to be applied to an existing basket, but it gives no explicit guidance on prerequisites, invalid codes, or why it should be chosen over sibling tools. Usage context is present but only by implication.

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