Close the active work item on a branch
spec.finish_workChanges dataCreates, updates or deletes something in your workspace.What it does
Marks the user story or test case you declared with spec.start_work as finished for this branch. Call it after the last commit for that work (and after verification). With enforcement on, further edits on the branch are blocked until spec.start_work is called again. You must say what you did NOT check: tests you did not run, aspects not verified (accessibility, browsers, performance, security…), known limits or shortcuts left in the code; pass [] only if there is truly nothing. Copy the notChecked cases from the last pdlc.verify result. Returns closed and the closed workItem.
Ask your agent
You don’t call spec.finish_work yourself. Say something like this to Claude Code, Cursor or another MCP-connected agent:
- “I am done with this story, close it in Test Maze”
Inputs
| Name | Type | Description |
|---|---|---|
branchrequired | string | Current git branch, from git rev-parse --abbrev-ref HEAD in the repository root. |
summaryoptional | string | Two or three sentences: what changed and how it was verified. |
notCheckedrequired | string[] | What was not checked, one item per entry, e.g. "Safari not tested", "AC3 not executed: needs a payment sandbox", "shortcut: retries are not rate-limited". [] means nothing was left unchecked. |
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.finish_work",
"arguments": {
"branch": "<branch>",
"notChecked": [
"<notChecked>"
]
}
}
}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.
More spec-based development tools
- Check the spec-based development rules and your active work item
spec.status - Declare the user story or test case a code change is for
spec.start_work - Show which commits implement a story or test case
spec.trace - Check a commit message carries a valid Testmaze-Ref trailer
spec.check_commit