Skip to main content
Glama

brain_update_coupon

Patch a coupon's editable fields.

Pass only the fields you want to change. To set a cap to unlimited (NULL in the schema), pass clear_uses_per_patron=true or clear_total_uses=true. Renaming the code is allowed — existing patron redemption rows survive (they key on coupon id). tool_ids replaces the coupon's binding — tool ids or MCP tool names, ["*"] for every paid tool, [] to unbind it.

RESTRICTED to operator — requires proof.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
tool_idsNo
coupon_idYes
dpop_tokenNo
total_usesNo
valid_fromNo
valid_untilNo
uses_per_patronNo
clear_total_usesNo
discount_percentNo
clear_uses_per_patronNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / tool_ids
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does add real behavioral info: renaming is safe because redemptions key on coupon id, tool_ids replaces the binding with explicit wildcard/empty semantics, and the operation is restricted to operator and requires proof. It doesn't cover reversibility or the response shape, but the key side effects are disclosed.

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 core patch action, followed by the non-obvious clearing flags and binding semantics, then the operator restriction. Every sentence adds value; formatting with short clauses keeps it tight.

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 an 11-param mutation tool with no annotations and an output schema present, the description covers the non-obvious parameters, the alias-vs-replace behavior, the id-keyed survival of redemptions, and the auth restriction. It stops short of covering all param formats and full side effects, keeping it strong but not exhaustive.

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?

Schema coverage is 0%, so the description must compensate. It explains clear_uses_per_patron/clear_total_uses as NULL-setting flags, tool_ids replacement semantics with ["*"] and [], and that only the coupon_id is required while other fields are optional. Several numeric/date params (discount_percent, valid_from/until, total_uses) format details remain undocumented.

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?

States a specific verb (patch) and resource (coupon's editable fields), and describes the semantics of several fields. It doesn't contrast against siblings like brain_delete_coupon or brain_forget_coupon, but the patch scope is clear.

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?

Explains the 'pass only fields you want to change' patch semantics and how to clear caps via clear_* flags, which is useful usage context. But it gives no guidance on when to choose this over brain_forget_coupon, brain_delete_coupon, or brain_mint_coupon.

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.