You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enforce review_code tool constraints: only pasted/open editor code, diagnostic-only responses
- Updated tool descriptions to clarify code must be cut/pasted or from open editor
- Added validation that code parameter is required (filePath is optional context only)
- Clarified that files are NOT read from disk
- Ensured responses contain only diagnostic information (no corrected code)
- Added comprehensive tests for code source constraints and diagnostic-only responses
- Updated documentation (CLAUDE.md, README) to reflect these constraints
Copy file name to clipboardExpand all lines: packages/mcp-server/src/mcp-production-client.ts
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -142,11 +142,13 @@ server.registerTool(
142
142
server.registerTool(
143
143
"review_code",
144
144
{
145
-
description: "Get AI-powered code review for Effect-TS code",
145
+
description: "Get AI-powered architectural review and diagnostic recommendations for Effect code. Only accepts code that is cut and pasted into the prompt or provided from an open editor file. Returns diagnostic information only (no corrected code).",
Copy file name to clipboardExpand all lines: packages/mcp-server/src/schemas/tool-schemas.ts
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -48,9 +48,9 @@ export const ToolSchemas = {
48
48
49
49
// Review Code Tool
50
50
reviewCode: z.object({
51
-
code: z.string().min(1).describe("Source code to review"),
52
-
filePath: z.string().optional().describe("File path for context (e.g., 'src/services/user.ts')"),
53
-
}).describe("Get AI-powered architectural review and recommendations for Effect code"),
51
+
code: z.string().min(1).describe("Source code to review (must be cut and pasted from prompt or provided from open editor)"),
52
+
filePath: z.string().optional().describe("File path for context only (e.g., 'src/services/user.ts'). Code must be provided via 'code' parameter - files are not read from disk."),
53
+
}).describe("Get AI-powered architectural review and diagnostic recommendations for Effect code. Only accepts code that is cut and pasted into the prompt or provided from an open editor file. Returns diagnostic information only (no corrected code)."),
54
54
55
55
// Paid-tier schemas removed from MCP tool surface (HTTP API only)
The `ReviewCodeService` provides high-fidelity architectural recommendations for Effect codebases with confidence scoring, fix plans, and guidance. Limited to top 3 findings in Free tier.
8
8
9
+
**Important**: This service only accepts code that is:
10
+
1. Cut and pasted into the prompt (code parameter)
11
+
2. Provided from an open editor file (code parameter with optional filePath for context)
12
+
13
+
Files are **NOT** read from disk. The `filePath` parameter is only used for TypeScript file extension validation and context/metadata. Only diagnostic information is returned (no corrected code).
0 commit comments