Skip to main content
Glama

Apply promo code

apply_promo
Idempotent

Validate and apply a promo code to the cart (server-checked). Returns the new discount/shipping/total, or applied=false with a reason. Args: code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesPromo code to validate and apply.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoNormalized promo code (when applied).
errorNoPresent when the cart is empty or code is missing.
totalNo
reasonNoWhy the code was rejected (when applied=false).
appliedNo
currencyNo
discountNo
shippingNo
subtotalNo

TDQS

A3.7/5.0
Behavior4/5

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

The description adds value beyond annotations by stating the tool is 'server-checked', and by describing the return format (new discount/shipping/total or applied=false with reason). Annotations already indicate idempotentHint=true and destructiveHint=false, so the description complements these with behavioral details about validation and error handling.

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 description is very concise with only two sentences. However, the phrase 'Args: code' is redundant given the schema, and could be omitted without loss. Still, it is efficiently structured and front-loaded with the core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one parameter and a described output schema (though not shown in detail here), the description covers the essential behavior: validation, application, and return values. It does not mention prerequisites like an existing cart, but this may be implied by the tool's role in a shopping flow.

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?

The input schema already provides full coverage (100%) with a clear description for the 'code' parameter: 'Promo code to validate and apply.' The tool description adds no new information about the parameter beyond the redundant 'Args: code', so it meets the baseline without improvement.

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 clearly states the verb 'Validate and apply a promo code to the cart', distinguishing it from sibling tools like 'remove_promo' (which removes a promo) and 'add_to_cart' (which adds items). The resource ('cart') and action are specific and unambiguous.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives (e.g., 'remove_promo' to remove a promo, or 'cart_update' for other modifications). The description does not mention prerequisites (e.g., cart must exist) or conditions for successful application.

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.

TDQS

A3.9/5.0
Disambiguation4/5

Tools are mostly distinct; slight overlap exists between cart_update and set_cart_quantity (both modify cart lines), and between remove_promo and cart_remove (different domains). Other groups (studio, designer) are well-separated.

Naming Consistency5/5

Consistent use of verb_noun pattern for most tools, with noun prefixes (designer_, studio_) grouping related tools. No mixed conventions or obscure abbreviations.

Tool Count3/5

31 tools is high for a single server, covering shopping, studio, and designer domains. Some tools like cart_update and set_cart_quantity seem redundant, pushing count beyond optimal.

Completeness4/5

Core workflows (search, cart, checkout, generation, designer submission) are covered. Minor gaps: no edit/delete for designs or orders, and no tool to manage saved addresses beyond viewing.

Resources