Skip to main content
Glama

prepare_stage_prompt

Writes a self-contained stage_prompt.md bundle for a paused external-seat run so a fresh subagent can execute a waiting stage without prior context. Pass the file path, then submit its deliverable.

Instructions

For a run paused at an external seat: write stage_prompt.md, a self-contained bundle a fresh subagent can act on with zero prior context, so a driving session can dispatch the stage instead of authoring it inline. Fork a subagent, give it only this file's path; take its returned deliverable back to submit_stage. A run can wait on several stages at once (waiting in external_prompt): pass stage to prepare another one than the first; its bundle is written to stage_prompt-.md. A stage that waits for a repair is refused (answer it with repair_reply).

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": "<run>"
    },
    "name": "prepare_stage_prompt"
  }
}

Input Schema

NameRequiredDescriptionDefault
runYes
stageNowhich waiting stage to bundle; defaults to the first in `waiting` that is not waiting for a repair

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.4
    • addedInput schema / properties / stage
      Added value: +{
      +  "description": "which waiting stage to bundle; defaults to the first in `waiting` that is not waiting for a repair",
      +  "maxLength": 200,
      +  "pattern": "^[A-Za-z0-9_][A-Za-z0-9._-]*$",
      +  "type": "string"
      +}
  2. First observedv0.8.1

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden, and it does disclose key behavior: a file is written, its name varies (stage_prompt.md vs stage_prompt-<stage>.md depending on stage selection), and repair-waiting stages are refused rather than bundled. It does not say whether an existing bundle is overwritten, what the tool returns (path vs content), or whether it mutates run state, which are notable gaps for a file-writing operation.

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 core action and its scope are front-loaded in the first clause, and each subsequent sentence adds a distinct piece of information (subagent handoff, multi-stage selection, repair refusal). It is dense and slightly run-on, packing workflow instructions into a single paragraph, but nothing is clearly redundant.

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 two-parameter, annotation-free tool with no output schema, the description covers the trigger condition, the artifact produced, naming variants, the refusal case, and the downstream handoff. The main omissions are the return value and overwrite behavior, which matter given there is no output schema to fall back on.

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 coverage is 50%: the stage parameter is already documented in the schema (pattern, default to first non-repair waiting stage), and the description adds the meaningful consequence that a named stage's bundle lands in stage_prompt-<stage>.md. The required run parameter is undocumented in both schema and description, so half the parameters still lack semantics — a baseline 3 is appropriate.

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 states a concrete verb and artifact: write stage_prompt.md, a self-contained bundle a fresh subagent can act on with zero prior context, scoped to a run paused at an external seat. It distinguishes this from sibling actions by naming submit_stage and repair_reply as the follow-up/alternative paths, so an agent can tell what this tool uniquely produces.

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?

It gives an explicit precondition (a run paused at an external seat), an explicit workflow (fork a subagent, give it only this file's path, take its deliverable back to submit_stage), and an explicit exclusion (a stage waiting for a repair is refused — answer it with repair_reply). It also explains how to handle multiple waiting stages via the stage parameter, naming the alternative selection behavior rather than leaving it to inference.

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