Skip to main content
Glama

Update promotion

update_promotion
Destructive

[REQUIRES HUMAN APPROVAL] Change an existing promotional or discount code. Pass promotionId from list_promotions and the updated attributes; returns the promotion API response.

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": {
      "promotionId": "<promotionId>",
      "attributes": "<attributes>"
    },
    "name": "update_promotion"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmNo[REQUIRES HUMAN APPROVAL] Pass `true` to execute. This is a programmatic backstop to the description tag. Destructive tools also require your approval through the client.
eventIdNoEvent ID. Defaults to active event.
attributesYesPromotion fields in dashboard shape.
promotionIdYesPromotion ID.
idempotencyKeyNoReuse the same key to replay a recorded successful request; use a new key for a different change.

Output Schema

NameRequiredDescriptionDefault
resultNoThe API result when it is a list, scalar or null rather than an object.
successNoWhether the promotion was updated.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "result": {
      +      "description": "The API result when it is a list, scalar or null rather than an object."
      +    },
      +    "success": {
      +      "description": "Whether the promotion was updated.",
      +      "type": "boolean"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / idempotencyKey / description
      Added value: +"Reuse the same key to replay a recorded successful request; use a new key for a different change."
  3. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is partly covered. The description adds meaningful context the annotations don't carry: a human-approval requirement and where the identifier originates. It does not clarify whether omitted attributes are preserved or overwritten, which is the main unresolved behavior for a mutation.

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?

Three short sentences with the approval tag front-loaded, so the most important constraint is seen first. The closing clause about returning the API response is somewhat redundant given an output schema exists, a minor waste.

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, five-parameter mutation with a fully described schema, live annotations, and an output schema, the definition covers enough to call it correctly. The remaining gap is partial-vs-full update semantics, which an agent would want before issuing the call.

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 100%, so all five parameters (including confirm, idempotencyKey, eventId) are already documented. The description only adds provenance for promotionId by pointing at list_promotions; it says nothing about the shape of 'attributes' or the default event behavior. Baseline 3 applies when the schema does nearly all the work.

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?

The description names a specific verb and resource ('Change an existing promotional or discount code'), which is far better than restating the title. It doesn't explicitly distinguish itself from create_promotion, so an agent must infer that this modifies rather than creates.

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 a concrete workflow: obtain promotionId from list_promotions, then pass the updated attributes. The human-approval gate is a clear usage constraint. What's missing is any exclusion guidance (e.g., when to use create_promotion instead), so it stops short of a 5.

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