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.json → mcpServers.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.


Verdict Tool ​

record_verdict ​

Record the final rulings of a review. The server computes the verdict, the overall grade and one grade per dimension, and returns the [REVIEW_STATS] marker the skill prints as the last line of its report. Call it once, after every finding is ruled.

Parameters:

ParameterTypeRequiredDescription
jobIdstringNoThe job ID for the review
findingsarrayYesEvery finding with its ruling (see below)
healthstringNoGrade A–E of the code health tally, when the review computed one
outcomeenumNocompleted (default), stopped (the team gate refused the PR), incomplete (a role never answered)

Finding fields:

FieldRequiredValues
dimensionYesfiabilite, securite, conception, lisibilite, tests, sante
severityYesblocking, important, suggestion, note
rulingYesmaintained, withdrawn, boy-scout, out-of-scope
originNointroduced (default), preexisting
file, lineNoLocation of the finding

Rules:

RuleResult
Retained findingsmaintained and boy-scout only
Grade of a findingblocking → D, important → C, suggestion → B, note → A
Dimension gradeWorst retained finding of the dimension (sante also takes health, the only source of E)
Overall gradeWorst dimension grade
Verdictchanges when a retained finding is blocking or important, else ready; stopped / incomplete follow outcome

Example: record_verdict({ jobId: "gitlab:...", findings: [{ dimension: "tests", severity: "important", ruling: "maintained" }] })

Response: { verdict, grade, levels, counts, marker }, where marker reads [REVIEW_STATS:blocking=0:warnings=1:suggestions=0:preexisting=0:verdict=changes:grade=C:levels=fiabilite=A,securite=A,conception=A,lisibilite=A,tests=C,sante=A].


Ember Tool ​

record_insight ​

Store a recurring review finding Ember derived for a project in Ember's private per-project memory (~/.claude-review/ember-memory/<project>.json), so a later answer reuses it. Use it for genuine recurring findings only, never arbitrary facts.

ParameterTypeRequiredDescription
projectPathstringYesThe answered project path
insightstringYesThe recurring finding to record

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_workflow → start_agent → complete_agent → set_phase → add_action → record_verdict. 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.