Class StartReviewTool
start_review
Entry point for the entire review workflow. Claude calls this tool when the developer
asks to review their code, e.g. "Review my changes before PR" or "Scan the whole project".
The tool creates a ReviewSession, launches
all sub-agents in a background thread, and immediately returns a reviewId —
without waiting for the review to complete.
Flow:
Developer: "Review my changes"
↓
Claude AI → calls start_review(project_path, scope)
↓
StartReviewTool.execute() → creates ReviewScope
→ calls OrchestratorAgent.startReview()
→ returns { reviewId: "abc-123", status: "RUNNING" }
↓
Claude AI → calls GetReportTool(reviewId) periodically to track progress
Created by: WorkshopServer.start() at server startup.
Receives OrchestratorAgent via constructor injection.
CERTIFICATION NOTE — covers two exam domains:
- Domain 4 — Tool Design & MCP Integration (18%):
This class IS an MCP tool. The
DESCRIPTIONfield is the instruction to Claude AI about when and how to call this tool. TheINPUT_SCHEMAdefines the JSON contract Claude must follow. Together they demonstrate Task Statement 4.1: "Design MCP tool interfaces with clear descriptions and input schemas." - Domain 1 — Agentic Architecture & Orchestration (27%): This tool is the trigger that starts the agentic loop. It demonstrates the async fire-and-forget pattern: return immediately with a handle (reviewId), let the orchestrator run agents in the background. This is Task Statement 1.7: "Manage session state, resumption, and forking."
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.modelcontextprotocol.server.McpServerFeatures.AsyncToolSpecificationtoolSpecification(io.modelcontextprotocol.json.McpJsonMapper jsonMapper) Builds the MCP tool descriptor and attaches the async execution handler.
-
Constructor Details
-
StartReviewTool
-
-
Method Details
-
toolSpecification
public io.modelcontextprotocol.server.McpServerFeatures.AsyncToolSpecification toolSpecification(io.modelcontextprotocol.json.McpJsonMapper jsonMapper) Builds the MCP tool descriptor and attaches the async execution handler.The tool descriptor contains the tool name, natural-language description (shown to the AI model), and the JSON Schema for the input parameters. The execution handler receives the parsed arguments and delegates to
.invalid reference
#execute(String)Called from: start() method of the main MCP server class once, during server initialization.
Analogy: toolSpecification() is like registering a service at the hotel reception — you say: "We offer room service, you call us at the number 101, and you need to tell us the room number and what you want." The MCP server remembers that and waits for calls.- Parameters:
jsonMapper- MCP JSON mapper used to parse theINPUT_SCHEMAstring into a schema object understood by the MCP framework Its like a translator between the Java and JSON worlds within the MCP framework. So: INPUT_SCHEMA (String) → jsonMapper → McpSchema object understood by the MCP framework.jsonMapper-- Returns:
- a fully configured async tool specification ready to be registered with the MCP server
-