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).

RESTRICTED to operator — requires proof.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
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. First observed

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden. It discloses partial-update semantics, the special clear flags for NULL values, the side effect that redemption rows survive renames (keying on coupon id), and the operator authentication requirement. These are meaningful behavioral traits beyond a generic 'update'.

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?

Four sentences, each earning its place: operation statement, partial-update instruction, NULL-clear mechanism, and rename side-effect plus auth restriction. No filler or redundancy.

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?

The tool has 10 parameters, mutation behavior, and side effects, yet the description covers the key aspects an agent needs: editable fields, partial updates, clear flags, rename semantics, and operator restriction. An output schema exists, so return-value details aren't needed. Missing edge cases like invalid dates or not-found handling, but overall adequate for correct invocation.

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 0%, so the description must compensate. It adds value for clear_uses_per_patron and clear_total_uses, and implies 'name' is the coupon code. However, it doesn't explain semantics for valid_from, valid_until, discount_percent, uses_per_patron, or total_uses beyond their names, leaving a gap for those parameters.

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 opens with 'Patch a coupon's editable fields'—a specific verb and resource that clearly distinguishes it from sibling tools like brain_delete_coupon and brain_mint_coupon. It also explicitly mentions renaming the code is allowed, further clarifying the tool's scope.

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?

Provides actionable guidance: 'Pass only the fields you want to change' and explains how to set caps to unlimited using clear flags. It also warns that the operation is RESTRICTED to operator, indicating prerequisites. It doesn't explicitly contrast with alternatives, but the coupon-specific context makes appropriate use clear.

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.