backtracking
Generate a structured backtracking scaffold to correct errors by rewinding to the last stable state, exploring alternative steps, and proposing a patched plan based on the failed step and constraints.
Instructions
Produce a recursive backtracking scaffold for error correction.
Args:
objective: Overall goal to satisfy.
failed_step: The step or subgoal that failed.
trace: Optional reasoning trace leading to the failure.
constraints: Guardrails or requirements to respect.
Returns:
Structured prompt that rewinds to last stable state, explores
alternatives, and proposes a patched plan.
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": {
"objective": "<objective>",
"failed_step": "<failed_step>"
},
"name": "backtracking"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| objective | Yes | ||
| failed_step | Yes | ||
| trace | No | ||
| constraints | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |