Skip to main content
Glama

ralph_retry

Retry a failed or interrupted PRD execution by resetting stagnation counters, handling uncommitted changes, and generating a new agent prompt to resume from where it left off.

Instructions

Retry a failed/interrupted PRD execution. Resets stagnation counters, handles uncommitted changes (WIP), and generates a new agent prompt to continue from where it left off.

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": {
      "branch": "<branch>"
    },
    "name": "ralph_retry"
  }
}

Input Schema

NameRequiredDescriptionDefault
branchYesBranch name (e.g., ralph/task1-agent)
wipPolicyNoHow to handle uncommitted changes: stash (default), commit, or keepstash

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.4

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false; the description goes further by disclosing three real side effects: stagnation counters are reset, uncommitted changes are handled, and a new agent prompt is produced. It does not cover failure modes (missing branch, dirty state under a given policy) or whether the retry is safe to repeat, which matters given idempotentHint=false.

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?

One front-loaded sentence with the primary action first and the supporting effects after; every clause carries information. Slightly dense, packing three distinct behaviors into a single sentence, but nothing is wasted.

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 mutation tool with no output schema and full schema coverage, the description supplies what the structured fields cannot: the recovery semantics and the fact that a continuation prompt is generated. Minor gaps remain around preconditions (branch existence) and post-retry state, but the core contract is clear.

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 100%, with branch and the wipPolicy enum (stash/commit/keep) fully documented in the schema itself. The description's mention of "handles uncommitted changes (WIP)" points at wipPolicy but adds no meaning beyond the schema's own explanation of each policy value.

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 ("Retry a failed/interrupted PRD execution") and enumerates the concrete effects: resetting stagnation counters, handling WIP, and generating a continuation prompt. This distinguishes it in spirit from ralph_start and ralph_reset_stagnation, though it never names a sibling explicitly.

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?

The trigger condition is clear — use it on a failed or interrupted PRD execution to resume from where it left off. There are no exclusions or named alternatives (e.g., when to prefer ralph_reset_stagnation or ralph_start instead), so it falls short of full routing guidance.

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