Skip to main content
Glama

delete_coupon

DestructiveIdempotent

Delete one coupon from an app. WRITE, human-gated: a real delete requires an elicitation-capable client; the human sees the exact coupon (code, percent, redemption count) and must click approve. The model cannot confirm on its own, and confirm_used is only consulted for dry_run previews. Clients without elicitation are refused UNLESS the deployment sets SPARK_PAY_MCP_ALLOW_UNELICITED_WRITES=1 and the call passes confirm_write:true, which is how Claude Code and cron reach these writes; dry_run still works anywhere. Removes the Stripe coupon object and then the coupons row, exactly like the dashboard's delete, so no orphaned Stripe object is left behind. Deleting is permanent and the code becomes reusable afterwards. Set dry_run:true to see exactly which coupon would go (and its redemption count) without touching anything. Use list_coupons first to confirm the code.

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": {
      "app_id": "<app_id>",
      "code": "<code>"
    },
    "name": "delete_coupon"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes
app_idYes
dry_runNo
confirm_usedNo
confirm_writeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / confirm_write
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the destructive/idempotent/openWorld annotations, the description discloses the human-approval gate, the elicitation-capable client requirement, the env-var bypass and confirm_write flag, the dry_run exception, and the exact two-step side effect (Stripe object then coupons row) so no orphan remains. It also states permanence and that the code becomes reusable afterwards.

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 safety-critical information is front-loaded and every clause carries operational weight, but the text is dense and dry_run is described twice (once in the gating discussion, again at the end), which adds minor redundancy.

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 destructive tool with no output schema and no schema descriptions, the definition covers safety gating, side effects, permanence, and preview behavior thoroughly. The remaining gaps are app_id semantics and what a successful response contains.

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 0%, so the description must carry the parameter burden; it explains dry_run, confirm_used (only consulted for dry_run previews), and confirm_write (paired with the env var), and ties code to the human-visible coupon details. However, app_id is never explained, so a required parameter remains undocumented.

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 opens with a specific verb and resource ("Delete one coupon from an app") and makes the singular scope explicit, which separates it from bulk_delete_coupon and create_coupon in the sibling list.

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?

It gives clear operating guidance: use list_coupons first to confirm the code, set dry_run:true to preview, and note that non-elicitation clients are refused unless the deployment env var plus confirm_write:true are present. It never explicitly names bulk_delete_coupon as the alternative for multi-coupon work, so the routing guidance is strong but not exhaustive.

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