Skip to main content
Glama

Approve Run (beta)

alterlab_run_approve
Idempotent

Approve a run that is awaiting approval (beta feature). The budget is reserved in one debit before any step starts; an insufficient balance returns 402 and no step runs. Optionally pass max_credits to lower the budget, or to raise it up to the run estimate. Approving an already approved run is a no-op that returns the current state. Spends credits up to the reserved budget; unused credits are refunded when the run ends.

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": {
      "run_id": "<run_id>"
    },
    "name": "alterlab_run_approve"
  }
}

Input Schema

NameRequiredDescriptionDefault
run_idYesRun id returned by alterlab_run_create
max_creditsNoOptional new budget for the run

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare idempotent=true and destructive=false, so the bar is lower, yet the description still adds real behavioral detail: a single debit reserves the budget before any step, insufficient balance yields a 402 with zero steps executed, and unused credits are refunded at run end. It also explains the mechanics behind the idempotent hint (repeat approval returns current state) rather than merely restating it.

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?

Front-loads the action and precondition, then moves through cost mechanics, the optional parameter, and the no-op case in short declarative sentences. No filler and no repeated restatement of the title or parameter names.

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

Completeness5/5

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

For a two-parameter, non-destructive lifecycle tool with no output schema, the description covers the state precondition, the billing side effect, the failure mode (402), the refund outcome, and idempotent behavior. An agent has everything needed to call it correctly and anticipate the result.

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 100%, so a baseline of 3 applies, but the description adds genuine meaning beyond "Optional new budget for the run" by explaining that max_credits may lower the budget or raise it only up to the run estimate. That constraint is not expressed anywhere in the schema (which only enforces minimum 1).

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 ("Approve a run") plus the precondition that the run must be "awaiting approval," which cleanly separates it from sibling lifecycle tools like alterlab_run_create, alterlab_run_cancel, and alterlab_run_result.

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 a clear when-to-use condition (run is awaiting approval) and covers the already-approved edge case as a no-op, so an agent knows it need not pre-check state. It stops short of explicitly naming which sibling to call instead when the run is not awaiting approval, which keeps it from a 5.

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.