Skip to main content
Glama

resume

Destructive

Continue a stuck or questioning program by choosing retry, skip, substitute action or code, answer, abort, or stop; then report its current state.

Instructions

Go on with a program that exec (or an earlier resume) left stuck, asking or running; id is the number in its reply, "Program is ". Give one choice, by the state that reply named:

  • stuck on an action: retry (after you fixed things with act's single actions), skip (value: what the program gets back instead), instead { tool, args } (do this action in its place), code (JavaScript run in the program in the action's place, with its calls and args: several steps, a loop; what it returns is what the action returns), or abort (true, or the error message; the program gets an error it may catch)

  • asking: answer (the program's ask() returns it), or abort

  • any state: stop: true ends the program; nothing at all waits for it again Then waits up to waitSec (default 30, at most 300) and replies the way exec does: where the program stands now (done with its result, stuck, asking, or still running). A program that has ended takes no choice (resume with only its id still reports it); to do it again, run it again with exec.

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": {
      "id": "<id>"
    },
    "name": "resume"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe program's id, from exec's reply
codeNoStuck: JavaScript to run in the program in the action's place (its calls and args are there; return what the action should return)
skipNoStuck: pass over the failed action; value is what it returns
stopNoEnd the program, whatever its state
abortNoStuck: true, or the error message the program gets
retryNoStuck: run the failed action again
valueNoWith skip: what the action returns to the program
answerNoAsking: the answer to its question
insteadNoStuck: run this tool with these args in the failed action's place
waitSecNoWait up to this long before answering; default 30

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.2.1
    • changedInput schema / properties / abort / description
      Previous value: -"true, or the error message the program gets"New value: +"Stuck: true, or the error message the program gets"
    • changedInput schema / properties / answer / description
      Previous value: -"The answer to its question"New value: +"Asking: the answer to its question"
    • changedInput schema / properties / id / description
      Previous value: -"The program's id, from exec"New value: +"The program's id, from exec's reply"
    • addedInput schema / properties / instead / description
      Added value: +"Stuck: run this tool with these args in the failed action's place"
    • addedInput schema / properties / retry / description
      Added value: +"Stuck: run the failed action again"
    • addedInput schema / properties / skip / description
      Added value: +"Stuck: pass over the failed action; value is what it returns"
    • addedInput schema / properties / stop / description
      Added value: +"End the program, whatever its state"
  2. First observedv0.2.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag destructive and open-world behavior, and the description adds substantial context beyond them: stop ends the program and nothing waits for it again, abort gives the program an error it may catch, code runs JavaScript in the action's place with its calls and args, and waitSec defaults to 30 with a 300 cap. It also discloses the reply shape (done, stuck, asking, or still running). No contradiction with annotations; destructive choices align with destructiveHint=true.

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?

The description is front-loaded with the core action and then organizes choices by state in a compact list. Sentences are long and somewhat run-on, but nearly every clause carries information rather than repetition.

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?

With 10 parameters, a nested object, and no output schema, the description does a lot: it covers all choices, waitSec defaults and bounds, and the reply format. It is largely complete, though the nested instead object's semantics are only briefly covered.

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 the baseline is 3. The description adds value by mapping each parameter to a program state (retry/skip/instead/code/abort for stuck; answer for asking; stop for any) and explaining what skip's value and abort's error mean to the program, which the schema descriptions do not fully convey.

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 and resource: continue a program that exec or an earlier resume left stuck, asking, or running. It distinguishes itself from exec by naming exec as the tool that starts programs. The phrasing is dense and run-on, but an agent can identify the operation and its sibling relationship.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly enumerates the choices per state (stuck, asking, any) and states the exclusion: a program that has ended takes no choice, so re-run it with exec. It also names the alternative tool for restarting. This is close to a complete when/when-not decision tree.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools