Attach the implementation plan to the active work item

spec.attach_planChanges dataCreates, updates or deletes something in your workspace.

What it does

After the story-plan prompt: records the plan document you committed (repo-relative path, commit sha and the file's content md5 from npx @testmaze/mcp docs manifest --dir docs/specs) on the active work item for this branch. The story's Definition of Ready then shows the plan, and reviewers find it from the story. Requires an active work item (spec.start_work). Returns the updated workItem.

Ask your agent

You don’t call spec.attach_plan yourself. Say something like this to Claude Code, Cursor or another MCP-connected agent:

  • “Attach docs/specs/AAts-…-saved-card.md as the plan for this story”

Inputs

NameTypeDescription
branch
required
stringCurrent git branch, from git rev-parse --abbrev-ref HEAD in the repository root.
planPath
required
stringRepo-relative path of the plan, e.g. "docs/specs/<storyId>-<slug>.md".
commitSha
optional
stringThe commit that added the plan.
md5
optional
stringContent md5 of the plan file, from docs manifest.

The MCP call

What the agent’s MCP client sends (placeholders in angle brackets):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "spec.attach_plan",
    "arguments": {
      "branch": "<branch>",
      "planPath": "<planPath>"
    }
  }
}

Connect your agent

npx -y @testmaze/mcp init tmt_xxx
claude mcp add tm --scope project -- npx -y @testmaze/mcp

Create the token in your Test Maze workspace under Settings → MCP. Setup for Cursor, Cline, Gemini CLI and Codex CLI is shown there too.