Skip to main content
Glama

plan

Saves a copy of each plan-mode plan to a searchable project vault, so you can show, archive, or restore the current plan later. Overwrites by slug, redacts credentials, and hides archived plans from search.

Instructions

Keep a copy of each plan of plan mode in planes//.md.

Only this tool writes there (revise and remember refuse it); Claude Code's own plan files are never read or touched. search and read find the copies; archived ones are hidden from search by default. save: write the copy of plan (one note per slug, the basename of plan_path; a save of the same slug overwrites it) and make it the current plan. Credentials are redacted and the text is cut at 200,000 characters. A hook variable left unsubstituted saves nothing. Returns {"path", "saved", "slug", "title", "created"}. With hook_event="PreToolUse" (the ExitPlanMode hook) it always returns "", errors included. show: without slug, {"plans": [...]} active plans of the project, newest first; with slug, that plan with its "content". archive: set status archived on slug, even when a session state links it; never deletes. Returns {"path", "changed"}. Plans more than [plans] archive_days (7) days after their saved_at are archived by the maintenance of the first welcome, except the one an active session state links. restore (SessionStart hook): only with source="clear", a short pointer to the plan of the task (this process's current plan, else the one the session state links, else the newest active plan of the worktree).

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": {
      "action": "<action>"
    },
    "name": "plan"
  }
}

Input Schema

NameRequiredDescriptionDefault
planNosave: the plan text (hooks pass ${tool_input.plan}).
slugNoshow, archive: slug of a plan (show without it lists them).
actionYesOne of: save, show, archive, restore.
sourceNorestore: "compact" or "clear" (${source}) from the hook.
projectNoProject; defaults to --project.
sessionNosave: Claude Code session id (${session_id}); metadata.
plan_pathNosave: the plan file path (${tool_input.planFilePath}); gives the slug.
hook_eventNoOnly for Claude Code hooks: ${hook_event_name}. Omit otherwise.
project_dirNoAbsolute project directory (hooks pass ${cwd}); picks the worktree.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.16.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: credential redaction, 200,000-character truncation, the silent no-op when a hook variable is unsubstituted, overwrite-on-same-slug, archive never deleting, the 7-day auto-archive rule with its session-linked exception, and the PreToolUse hook always returning an empty string even on error. This is exactly the operational context an agent cannot get from the schema.

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?

Dense but well organized: a scoping paragraph, then a labeled block per action, each carrying its return shape. No filler sentences; every clause conveys a constraint. The telegraphic style and placeholder tokens like '[plans] archive_days (7)' cost some readability but not much length.

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 9-parameter, four-action tool with no output schema, the description covers per-action return shapes, hook-only inputs, overwrite and retention behavior, and error edges. Remaining gaps are minor, e.g. what project defaults to beyond '--project' and what restore prints when no plan matches.

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, but the description adds genuine meaning: plan_path 'gives the slug', a repeat save of the same slug overwrites, session is metadata only, and source only matters for restore/re"clear". These are behavioral semantics the field descriptions do not fully spell out.

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?

The opening line states the resource and persistence location ('Keep a copy of each plan of plan mode in planes/<project>/<slug>.md') and the per-action paragraphs define save/show/archive/restore concretely. It also distinguishes itself from siblings ('Only this tool writes there (revise and remember refuse it)'), though the overall one-line purpose is buried under action-specific detail rather than stated crisply up front.

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?

Each action carries its own usage condition: show lists plans without a slug, restore applies 'only with source="clear"', hook_event is 'Only for Claude Code hooks... Omit otherwise'. It also clarifies the division of labor with revise/remember and with search/read. What's missing is explicit routing guidance for non-hook callers choosing between save and revise.

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