Skip to main content
Glama

Create promotion

create_promotion

[REQUIRES HUMAN APPROVAL] Add a new promotional or discount code to an event using its attributes. Returns the promotion API response; use list_promotions to review existing codes first.

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": {
      "attributes": "<attributes>"
    },
    "name": "create_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 attributes (code, discount, usage limit, etc.).
idempotencyKeyNoReuse the same key to replay a recorded successful request; use a new key for a different change.

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "id": {
      +      "description": "Promotion identifier.",
      +      "type": [
      +        "string",
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "result": {
      +      "description": "The API result when it is a list, scalar or null rather than an object."
      +    },
      +    "success": {
      +      "description": "Whether the promotion was created.",
      +      "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

A4.2/5.0
Behavior4/5

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

Annotations declare this as a non-destructive write with no open-world access; the description adds the materially important fact that execution requires human approval, which the annotations do not convey. It also notes the return is the promotion API response, though an output schema already covers returns.

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 the approval gate front-loaded, then purpose, then the recommended prior step. Nothing is repeated and no sentence is filler.

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?

Approval requirements, recommended ordering, and return behavior are all covered, and an output schema exists so return values need no elaboration. The only gap is that the free-form attributes object is left to the schema without any hint about required keys like code, which is a minor omission for a creation tool.

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 parameters such as confirm, eventId, and idempotencyKey are already documented in the schema. The description only echoes that attributes are supplied, adding no meaning beyond the structured fields. Baseline 3 applies.

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 ('Add a new promotional or discount code to an event'), which cleanly separates it from list_promotions and update_promotion. The sibling reference makes the create-vs-review distinction explicit without needing to open another schema.

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 concrete workflow guidance ('use list_promotions to review existing codes first') plus the human-approval precondition, which is real when-to-use routing. It stops short of stating when not to use it (e.g., when a code already exists and should be updated instead), so it 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