Skip to main content
Glama

Thmenu

Preview a promo code

apply_promo
Read-onlyIdempotent

Validate a promo code (eligibility preview only — does NOT reserve a slot). Returns valid=true with discount info when the code is currently redeemable; pass the same code as place_order.promo_code to actually apply + redeem it (the slot is consumed only when the order lands).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
agent_session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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=true, idempotentHint=true and destructiveHint=false, so the safety profile is covered. The description adds real value beyond them: it discloses that no slot is reserved, that the slot is consumed only when the order lands, and the return shape ('valid=true with discount info'). It stops short of auth or rate-limit context, so a 4 rather than a 5.

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?

A single dense sentence, front-loaded with the core action and scope caveat, followed by the downstream usage pointer — only one sentence and no filler. Slightly long/parenthetical-heavy but every clause carries 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?

With no output schema, the description supplies the return semantics (valid=true plus discount info) and the side-effect contract (no slot consumed). Given only 2 params and one being a session identifier conventional across the sibling set, this is nearly complete, with only agent_session_id 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 coverage is 0%, so the description must carry the parameter burden. It does clarify 'code' semantics by tying it to place_order.promo_code, but says nothing about agent_session_id, leaving one of two required parameters undocumented anywhere. Partial compensation merits a mid score.

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+resource ('Validate a promo code') and explicitly delimits the scope ('eligibility preview only — does NOT reserve a slot'), which resolves the tension between the imperative name apply_promo and the preview title. An agent can distinguish this from place_order without opening either 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?

Names the alternative path explicitly ('pass the same code as place_order.promo_code to actually apply + redeem it') and gives the condition that selects each path (preview vs. actual consumption on order landing). This is exactly the when/when-not/alternative guidance the dimension asks for.

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