Skip to main content
Glama

End discount code

expire_discount_code
DestructiveIdempotent

Stop a code working now, on every site using that Stripe account. Orders that already used it keep their discount.

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": {
      "siteId": "<siteId>",
      "codeId": "<codeId>"
    },
    "name": "expire_discount_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeIdYesid from list_discount_codes, "promo_…"
siteIdYesSite id (from list_sites)

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 destructiveHint=true and idempotentHint=true, so the description's value is the extra context: the effect propagates to every site on the same Stripe account, and historical orders are unaffected. It does not say whether the expiry is reversible or whether re-running on an already-expired code errors, but the mutation's scope and data impact are well disclosed.

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 zero filler; the action and its scope come first, and the historical-order caveat follows as a natural qualifier.

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 two-parameter mutation with no output schema and full annotation coverage, it supplies action, scope, and data-retention behavior. Only the reversibility of the expiry is left unstated.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description goes further by clarifying that siteId identifies the Stripe account whose codes are affected, meaning the parameter does not limit the change to one site — a non-obvious scoping detail the schema does not convey.

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 and resource ('Stop a code working now') plus the exact blast radius ('on every site using that Stripe account'), which lets an agent distinguish it from create_discount_code 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 Guidelines3/5

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

Implies the right context (ending an active code rather than creating one) and hints at a soft-expire semantic by noting past orders keep their discount, but it never explicitly says when not to use it or names an alternative for hard deletion or re-enabling.

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