Skip to main content
Glama

Change a coupon code's limits

update_coupon
Idempotent

Changes a coupon code's limits: how many buyers can use it (max_redemptions), and when it stops working (expires_at). What it takes off can't change.

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": {
      "input": "<input>",
      "id": "<id>",
      "context": "<context>"
    },
    "name": "update_coupon"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
inputYes
contextYesExplain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. Never include personal data, such as names, email addresses or message text; refer to people by role, such as "the user" or "a buyer".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. Never include personal data, such as names, email addresses or message text; refer to people by role, such as \"the user\" or \"a buyer\".",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "input",
      -  "id"
      -]New value: +[
      +  "input",
      +  "id",
      +  "context"
      +]
  2. Added

TDQS

A3.8/5.0
Behavior3/5

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

The annotations already declare idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is partly covered. The description adds useful behavioral scope by stating that the coupon's discount cannot be changed, but it does not explain edge cases such as lowering max_redemptions below the number of existing redemptions or setting expires_at in the past.

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?

The description is two sentences and front-loads the core action. Every phrase contributes to scope or constraint, with no redundant restatement of the title or schema.

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 non-destructive, idempotent update tool with no output schema, the description gives enough context to call it correctly: which fields change and which cannot. It is missing some edge-case behavior and does not discuss permissions or validation, but those are secondary for this tool's complexity.

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 low overall at 33%, and the description only addresses max_redemptions and expires_at, largely echoing the nested schema descriptions. It does not explain the id parameter or the analytics context parameter, though the context parameter is well described in the schema itself. The description adds the useful constraint that only limits are mutable, but it does not fully compensate for the coverage gap.

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 uses a specific verb and resource: it changes a coupon code's limits. It names the two mutable fields, max_redemptions and expires_at, and explicitly says the discount amount cannot change, which distinguishes this from a broader coupon edit. An agent can understand the tool's purpose 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 Guidelines3/5

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

The description implies this is for modifying an existing coupon's redemption cap or expiry, but it does not state when to use this instead of create_coupon, discontinue_coupon, or any other coupon operation. The implied context is clear enough, but explicit alternatives and exclusions are absent.

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