Skip to main content
Glama

Edit a program

update_program
Idempotent

Changes a program’s name, reward, stamps, terms or branches. Only possible while the program has never been used: after its first stamp the rules are locked (the owner can duplicate it as a draft in the app). Archived programs can’t be edited. The status (draft or active) doesn’t change.

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": {
      "program_id": "<program_id>"
    },
    "name": "update_program"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNo
termsNo
rewardNo
branch_idsNo
program_idYesFrom list_programs
cashier_choosesNoThe cashier picks 1…max stamps per visit, starting at default
stamps_per_visitNoFixed stamps per visit (default 1). Leave out when the cashier chooses.
stamps_to_rewardNoStamps needed for the reward (1–10; a program that already needs more keeps its count)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / stamps_to_reward / description
      Added value: +"Stamps needed for the reward (1–10; a program that already needs more keeps its count)"
    • changedInput schema / properties / stamps_to_reward / minimum
      Previous value: -2New value: +1
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, it discloses the key lifecycle constraint that the program locks after its first stamp, that archived programs are rejected, and that status (draft/active) is left untouched by an edit. These are exactly the behavioral facts an agent needs and none are derivable from the annotations alone.

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?

Three tight sentences, led by what changes and followed by the conditions that gate it. No redundant restatement of the title or annotations.

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 non-destructive, idempotent mutation with no output schema, the description covers preconditions and non-effects well. The remaining gap is partial-update semantics: it never says whether omitted fields are left unchanged, which matters with 8 optional parameters.

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 only 50%, so the description helps by naming the editable fields (name, reward, stamps, terms, branches), implicitly telling the agent that program_id identifies the target and that status is not a settable parameter. It does not explain the stamps_to_reward clamp or the cashier_chooses vs stamps_per_visit mutual exclusion, which the schema descriptions only partially cover.

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 ('Changes a program') and enumerates the editable facets: name, reward, stamps, terms, branches. This is unambiguous and clearly distinct from create_program and archive_program in the sibling set.

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 explicit preconditions for use: only while the program has never been used, and never for archived programs. It even points to the in-app workaround (duplicate as draft) when the rules are locked. It stops short of naming any concrete alternative tool or stating what to do when the edit is rejected.

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