Skip to main content
Glama

Create a coupon

create_coupon

Creates a coupon for buying packs. kind: percent (value = % off), amount (value_eur off), extra (value = free classes added), bonus (value = % more classes, same price and expiry: 30 turns 10 classes into 13; 100 = 1+1, double). Free classes do not apply to unlimited packs. Without code it applies automatically to the members it is for; with code the member types it when buying. Acts on one venue, given its address and access key.

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": {
      "address": "<address>",
      "access_key": "<access_key>",
      "name": "<name>",
      "kind": "<kind>"
    },
    "name": "create_coupon"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNoOptional code, 3-30 Latin letters, digits or dashes. Leave out for an automatic coupon.
fromNoOptional first day, YYYY-MM-DD.
kindYes
nameYesShown to members next to the price, e.g. "New Year".
untilNoOptional last day, YYYY-MM-DD.
valueNopercent: 1-100; extra: 1-100 classes; bonus: 1-500 (% more classes, 100 = 1+1). Not for amount.
addressYesThe venue’s address name, the "name" in name.bookare.app.
max_usesNoTotal uses. Leave out for no limit.
pack_idsNoOnly for these packs (pack ids). Leave out for all packs.
group_idsNo
value_eurNoOnly for kind amount, e.g. 10.
access_keyYesThe venue’s access key.
member_idsNoOnly for these members (with group_ids). Leave both out for all members.
per_memberNoUses per member, 0 = no limit. Default 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations only say this is a non-read-only, non-idempotent write; the description adds substantive behavior: the coupon is scoped to a single venue, applies automatically vs. requires entry, and free-class coupons are ignored for unlimited packs. Error handling and post-creation lifecycle are not covered, but the added context is well beyond the annotation bar.

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?

Front-loaded with the action, then the kind vocabulary, then redemption and venue scoping — every clause carries information. The parenthetical kind explanations make sentences long and slightly dense, but nothing is redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-parameter mutation with no output schema, the description covers the semantically tricky parts (kind, code, venue scoping) but says nothing about what is returned or how to reference the created coupon afterwards. Targeting via group_ids/member_ids and per_member limits are left wholly to the schema, leaving the definition adequate but not complete.

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?

With 86% schema coverage the baseline is 3, and the description earns more by explaining kind semantics with a worked example ("30 turns 10 classes into 13; 100 = 1+1, double") and by tying the presence/absence of code to automatic vs. manual redemption. It leaves group_ids, member_ids and per_member behavior entirely to the schema, which is acceptable given the coverage.

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?

Opens with a specific verb and resource ("Creates a coupon for buying packs") and immediately qualifies the four coupon kinds, so an agent knows exactly what is produced. It does not name any sibling (e.g. set_coupon_active) to distinguish this from other coupon operations, which keeps it just below a 5.

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?

Gives real usage context: acting on one venue via address + access key, and the choice between an automatic coupon (no code) and a typed-code coupon. It never states when to prefer this over changing an existing coupon's state, nor any prerequisites beyond the venue credentials.

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