Skip to content

MCP Tools Reference

Reference for all MCP tools. Unlike text markers (see Markers Reference), MCP tools provide structured communication with immediate feedback.

Server: dist/mcpServer.js | Config: ~/.claude/settings.jsonmcpServers.review-progress | Logs: ~/.claude-review/logs/mcp-server.log

Environment Variables

Passed by claudeInvoker.ts:

VariableDescriptionExample
MCP_JOB_IDUnique job identifiergitlab:mentor-goal/main-app-v3:4746
MCP_LOCAL_PATHLocal repository path/home/user/projects/frontend
MCP_MERGE_REQUEST_IDPlatform-specific MR/PR IDgitlab-mentor-goal/main-app-v3-4746
MCP_JOB_TYPEJob typereview or followup

Progress Tools

get_workflow

Get the current workflow state including all agents and their status.

Parameters:

ParameterTypeRequiredDescription
jobIdstringYesThe job ID for the review

Example: get_workflow({ jobId: "gitlab:mentor-goal/main-app-v3:4746" })

Response: { jobId, phase, overallProgress, agents: [{ name, status, progress }] }


start_agent

Signal that an agent audit is starting.

Parameters:

ParameterTypeRequiredDescription
jobIdstringYesThe job ID for the review
agentNamestringYesName of the agent starting (kebab-case)

Example: start_agent({ jobId: "gitlab:...", agentName: "clean-architecture" })

Response: { success, agent, status: "running" }. Sets agent to running, broadcasts via WebSocket. Unknown agents are dynamically added.

Equivalent Marker: [PROGRESS:clean-architecture:started]


complete_agent

Signal that an agent audit is complete.

Parameters:

ParameterTypeRequiredDescription
jobIdstringYesThe job ID for the review
agentNamestringYesName of the agent completing
statusenumYessuccess or failed
errorstringNoError message if status is failed

Example: complete_agent({ jobId: "gitlab:...", agentName: "clean-architecture", status: "success" })

Response: { success, agent, status, overallProgress }. Recalculates overall progress and broadcasts via WebSocket.


set_phase

Set the current review phase.

Parameters:

ParameterTypeRequiredDescription
jobIdstringYesThe job ID for the review
phaseenumYesPhase to set

Valid Phases:

PhaseDescription
initializingReview setup (loading config, fetching MR data)
agents-runningIndividual agents analyzing code
synthesizingCombining agent results into final report
publishingPosting results to platform
completedReview finished

Example: set_phase({ jobId: "gitlab:...", phase: "synthesizing" })

Response: { success, phase }. Broadcasts via WebSocket. Idempotent (duplicate phase changes accepted).

Equivalent Marker: [PHASE:synthesizing]


Thread Tools

get_threads

Get all discussion threads from the MR/PR.

Parameters:

ParameterTypeRequiredDescription
jobIdstringYesThe job ID for the review

Example: get_threads({ jobId: "gitlab:mentor-goal/main-app-v3:4746" })

Response: { threads: [{ id, resolved, author, body, file, line, createdAt }] }. Loaded from review context file created by claudeInvoker.ts at job start.


add_action

Queue an action to be executed (resolve thread, post comment, reply).

Parameters:

ParameterTypeRequiredDescription
jobIdstringYesThe job ID for the review
typeenumYesAction type
threadIdstringConditionalThread ID (required for THREAD_RESOLVE, THREAD_REPLY)
messagestringConditionalReply message (required for THREAD_REPLY)
bodystringConditionalComment body (required for POST_COMMENT)

Action Types:

TypeDescriptionRequired Params
THREAD_RESOLVEResolve/close a threadthreadId
THREAD_REPLYReply to a threadthreadId, message
POST_COMMENTPost top-level commentbody

Example: add_action({ jobId: "gitlab:...", type: "THREAD_RESOLVE", threadId: "abc123" })

Response: { success, action, queuePosition }. Actions are queued and executed in order after review completion by claudeInvoker.ts.


MCP Tools vs Text Markers

MCP tools provide structured JSON with immediate feedback, real-time WebSocket dashboard updates, and explicit error handling. Text markers are simpler (no setup) but parsed after CLI completion with silent failures. Use MCP for real-time progress; markers for backward compatibility.


Debugging

Logs: tail -f ~/.claude-review/logs/mcp-server.log

See Troubleshooting for common MCP issues.

Integration with Skills

In a skill, call tools in order: get_workflowstart_agentcomplete_agentset_phaseadd_action. The skill must run in a context where MCP servers are loaded (Claude must invoke the tools, not just reference them).

Released under the MIT License.