Skip to main content
Glama

Apply a discount code

apply_discount_code

Apply a discount code the user gives you to a registration that isn't paid yet.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "business_id": "<business_id>",
      "code": "<code>"
    },
    "name": "apply_discount_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes
business_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false and destructiveHint=false, so the safety profile is covered. The description's added value is the unpaid-registration precondition, but it says nothing about invalid/expired codes, whether an existing discount is replaced or stacked (relevant given idempotentHint=false), or whether fees are recalculated.

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 sentence with no wasted words, and the operative verb plus the precondition are front-loaded. Structure is efficient, though the pivotal detail (which business/registration the business_id refers to) is absent rather than merely compressed.

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 mutation tool with no output schema and 0% schema description coverage, the definition covers purpose and one precondition but leaves failure behavior and return expectations unexplained. It is adequate to attempt a call, not complete enough to predict the outcome.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for both parameters, so the description must carry the burden. It clarifies that the code is user-supplied rather than generated, but never mentions business_id, and its use of "registration" instead of the actual parameter name adds mapping ambiguity rather than removing it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ("Apply a discount code") and adds the target scope ("a registration that isn't paid yet"), which distinguishes it from remove_discount_code. The only weakness is that it says "registration" while the tool actually keys on a business_id, leaving a small ambiguity about what is being modified.

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 real trigger condition ("the user gives you") plus a precondition ("registration that isn't paid yet"), which is enough for an agent to decide when to call it. It does not name alternatives such as remove_discount_code or explain what to do if the registration is already paid, so it stops short of full when/when-not guidance.

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