Check a commit message carries a valid Testmaze-Ref trailer
spec.check_commitReadsOnly looks things up; never changes your workspace.What it does
Validates a commit message before you commit: it must contain a "Testmaze-Ref: <id>" trailer line naming a user story or test case in this workspace (several ids may be comma-separated). Returns ok, the resolved refs and errors. The git commit-msg hook runs the same check. Read-only.
Ask your agent
You don’t call spec.check_commit yourself. Say something like this to Claude Code, Cursor or another MCP-connected agent:
- “Is this commit message traceable for Test Maze?”
Inputs
| Name | Type | Description |
|---|---|---|
messagerequired | string | The full commit message. |
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.check_commit",
"arguments": {
"message": "<message>"
}
}
}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 - Close the active work item on a branch
spec.finish_work - Show which commits implement a story or test case
spec.trace