Skip to content

[plan] MCP server quick wins: icons, handler docs, and error code fix #30986

@github-actions

Description

@github-actions

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

  • All 10 MCP tools have an mcp.Icon set
  • A comment explains the any return value in tool handler signatures
  • argumentValidationMiddleware returns CodeMethodNotFound for unknown tool names
  • make build && make test-unit passes
  • PR created with changes

Generated by Plan Command for issue #discussion #30965 · ● 1.1M ·

  • expires on May 10, 2026, 10:05 AM UTC

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions