Skip to main content
Glama

Apply a promo code

bk_cart_promo

Apply (or remove) a promo / discount code on the live booking cart. Use when the user gives a promo code; call before bk_cart_checkout so the discounted total shows. Set remove=true to take a code off.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
removeNoTrue to remove the code instead of applying it
promo_codeYesThe promo / discount code
session_keyYesThe cart session key

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-destructive, non-idempotent, closed-world behavior, so the safety profile is covered. The description adds useful context beyond that: it operates on the 'live booking cart', it must run before checkout for the total to reflect, and remove=true strips a code. No contradiction with destructiveHint=false, since removing a cart code is not a destructive operation.

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 short sentences, zero filler, with the purpose front-loaded before the trigger and the remove flag. Every sentence carries distinct information.

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 3-parameter cart mutation with no output schema and full annotation coverage, the description supplies what's needed: purpose, trigger, sequencing, and the remove path. The only minor gap is the resulting cart state after applying an invalid or expired code, which is left unaddressed.

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 all three parameters (session_key, promo_code, remove) are already documented. The line 'Set remove=true to take a code off' largely restates the schema's own description of the remove flag rather than adding new syntax or constraints, so baseline 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?

States a specific verb pair (apply/remove) and resource (promo/discount code) scoped to the 'live booking cart', which cleanly separates it from bk_cart_add and bk_cart_checkout. An agent can tell what it does and does not do without opening the schema.

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 a clear trigger ('when the user gives a promo code') and sequencing guidance ('call before bk_cart_checkout so the discounted total shows'), which is genuinely useful for a cart workflow. It stops short of naming when-not conditions or alternatives, but the ordering constraint is explicit.

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