Skip to main content
Glama
kagan-sh

Kagan - AI Orchestration Layer

session_rewind

Restore a task's worktree to a previous checkpoint by specifying task ID and step index. Discards uncommitted changes and later commits.

Instructions

Rewind the task's worktree to the commit captured at step_index.

Performs a hard reset of the worktree to the checkpoint's commit SHA. Any uncommitted changes and commits after the checkpoint are discarded.

task_id is the ID of the task to rewind. step_index identifies which checkpoint to restore.

Returns dict with: task_id, session_id, step_index, commit_sha.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes
step_indexYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Without annotations, the description carries full burden. It clearly states that a 'hard reset' occurs and 'any uncommitted changes and commits after the checkpoint are discarded,' which is good disclosure of destructive behavior. It also mentions the return dict structure. However, it does not cover permissions or error conditions.

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?

The description is concise and well-structured: purpose first, then mechanism, consequences, parameter explanations, and return format. Every sentence adds value without redundancy.

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 destructive tool with two simple parameters and an output schema mentioned in the description, it is fairly complete. It explains the action, consequences, and return value. Missing are potential error cases (e.g., invalid step_index) but overall adequate.

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?

With 0% schema description coverage, the description compensates by explaining each parameter: 'task_id is the ID of the task to rewind' and 'step_index identifies which checkpoint to restore.' This adds meaningful context beyond the schema titles.

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 uses a specific verb 'rewind' and clearly identifies the resource as 'task's worktree' to a checkpoint. It distinguishes from sibling tools like checkpoint_create (creates) and checkpoint_list (lists), making the purpose unambiguous.

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

Usage Guidelines3/5

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

The description implies usage for restoring a worktree to a previous checkpoint but does not explicitly state when to use this tool versus alternatives (e.g., viewing checkpoints first with checkpoint_list). No guidance on prerequisites or context is provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kagan-sh/kagan'

If you have feedback or need assistance with the MCP directory API, please join our Discord server