Objective
Implement 3 quick wins identified in the Go SDK module review (discussion #30965) to improve UX and correctness of the MCP server.
Context
Source: Go Module Review discussion #30965
Tasks
1. Add icons to all 10 MCP tools
Only the status tool currently uses mcp.Icon{Source: "📊"}. IDE extensions and visual MCP clients display these icons; adding one per tool improves UX with trivial effort.
Suggested mapping (adjust as appropriate):
compile → 📋
logs → 📝
audit → 🔍
audit-diff → 🔎
mcp-inspect → 🔬
checks → ✅
add → ➕
update → 🔄
fix → 🔧
Search for tool registration calls in pkg/cli/ or pkg/workflow/ (whichever file calls mcp.AddTool) and add the Icon field to each.
2. Document the any second return value in tool handlers
Every tool handler has the signature func(...) (*mcp.CallToolResult, any, error) where the any is always returned as nil. Add a one-line comment at the definition site (or in a shared doc comment) explaining that the any slot is a reserved SDK extension point and should always be nil for now.
3. Use jsonrpc.CodeMethodNotFound for unknown tool names
In argumentValidationMiddleware (search for this function in pkg/), when mcpToolParams() returns no entry for a given tool name the code returns jsonrpc.CodeInvalidParams. For a completely unknown tool name, jsonrpc.CodeMethodNotFound is semantically correct per JSON-RPC 2.0. Update that branch to use CodeMethodNotFound.
Files to Investigate
- Search for
mcp.AddTool across pkg/ to find tool registration
- Search for
argumentValidationMiddleware across pkg/ for the error-code fix
- Search for
CallToolResult handler signatures for the doc comment
Acceptance Criteria
Generated by Plan Command for issue #discussion #30965 · ● 1.1M · ◷
Objective
Implement 3 quick wins identified in the Go SDK module review (discussion #30965) to improve UX and correctness of the MCP server.
Context
Source: Go Module Review discussion #30965
Tasks
1. Add icons to all 10 MCP tools
Only the
statustool currently usesmcp.Icon{Source: "📊"}. IDE extensions and visual MCP clients display these icons; adding one per tool improves UX with trivial effort.Suggested mapping (adjust as appropriate):
compile→📋logs→📝audit→🔍audit-diff→🔎mcp-inspect→🔬checks→✅add→➕update→🔄fix→🔧Search for tool registration calls in
pkg/cli/orpkg/workflow/(whichever file callsmcp.AddTool) and add theIconfield to each.2. Document the
anysecond return value in tool handlersEvery tool handler has the signature
func(...) (*mcp.CallToolResult, any, error)where theanyis always returned asnil. Add a one-line comment at the definition site (or in a shared doc comment) explaining that theanyslot is a reserved SDK extension point and should always benilfor now.3. Use
jsonrpc.CodeMethodNotFoundfor unknown tool namesIn
argumentValidationMiddleware(search for this function inpkg/), whenmcpToolParams()returns no entry for a given tool name the code returnsjsonrpc.CodeInvalidParams. For a completely unknown tool name,jsonrpc.CodeMethodNotFoundis semantically correct per JSON-RPC 2.0. Update that branch to useCodeMethodNotFound.Files to Investigate
mcp.AddToolacrosspkg/to find tool registrationargumentValidationMiddlewareacrosspkg/for the error-code fixCallToolResulthandler signatures for the doc commentAcceptance Criteria
mcp.Iconsetanyreturn value in tool handler signaturesargumentValidationMiddlewarereturnsCodeMethodNotFoundfor unknown tool namesmake build && make test-unitpasses