feat: register remaining MCP tools
This commit is contained in:
+28
-1
@@ -53,6 +53,8 @@ Total: 139 orchestration-only tests, all passing.
|
||||
|
||||
## Completed (Phase 5)
|
||||
|
||||
**All five MCP tools registered:** ask_chatgpt, review_plan, review_code, debug_issue, architecture_review.
|
||||
|
||||
### Task 5.1 - MCP server skeleton ✅
|
||||
|
||||
Minimal MCP stdio server in `src/server.js`. MCP initialize handshake succeeds. No tools registered yet.
|
||||
@@ -78,9 +80,34 @@ Minimal MCP stdio server in `src/server.js`. MCP initialize handshake succeeds.
|
||||
|
||||
**Production code (`src/server.js`):** ~39 lines, single `ask_chatgpt` tool registered with MCP via Stdio transport.
|
||||
|
||||
### Task 5.3 - Register remaining MCP tools ✅
|
||||
|
||||
Four additional MCP tools registered on the server (`src/server.js`):
|
||||
|
||||
| Tool | Handler |
|
||||
|------|---------|
|
||||
| `review_plan` | handleReviewPlan |
|
||||
| `review_code` | handleReviewCode |
|
||||
| `debug_issue` | handleDebugIssue |
|
||||
| `architecture_review` | handleArchitectureReview |
|
||||
|
||||
**All five MCP tools now registered:** ask_chatgpt, review_plan, review_code, debug_issue, architecture_review.
|
||||
|
||||
**Smoke test results (all passing):**
|
||||
- initialize → server returns `chatgpt-mcp` v0.1.0 ✅
|
||||
- tools/list → 5 tools total ✅
|
||||
- tools/call reaches handlers for all 5 tools ✅
|
||||
- missing OPENAI_API_KEY → structured tool errors: `"Error: Configuration error: OPENAI_API_KEY is missing."` ✅
|
||||
- npm test → 523 tests pass across 18 test files, no regressions ✅
|
||||
|
||||
**Implementation notes:**
|
||||
- Each tool registered explicitly with its own `registerTool()` call — no registry abstraction.
|
||||
- All handlers use existing modules only (no new imports or files).
|
||||
- SDK quirk: `isError: true` wraps results in JSON-RPC error envelope (`code: -32603`).
|
||||
|
||||
## Next Pending
|
||||
|
||||
### Task 5.3 - Register remaining MCP tools (review_plan, review_code, debug_issue, architecture_review)
|
||||
### Task 5.4 - Normalize MCP tool error formatting
|
||||
|
||||
## General Rules
|
||||
|
||||
|
||||
Reference in New Issue
Block a user