Skip to content

Use live gh-aw version for MCP inspector and make tool icons spec-compliant#45450

Merged
pelikhan merged 4 commits into
mainfrom
copilot/go-fan-go-module-review
Jul 14, 2026
Merged

Use live gh-aw version for MCP inspector and make tool icons spec-compliant#45450
pelikhan merged 4 commits into
mainfrom
copilot/go-fan-go-module-review

Conversation

Copilot AI commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

The MCP SDK review surfaced two small protocol-alignment gaps in gh-aw: the inspector client reported a hardcoded version, and MCP tool icons used raw emoji instead of URI-backed icon sources. This change aligns the MCP metadata we emit with the SDK/spec while preserving current UX.

  • Inspector client identity

    • Replace the hardcoded gh-aw-inspector version with GetVersion().
    • This keeps remote MCP server logs and diagnostics aligned with the actual CLI version in use.
  • Spec-compliant MCP tool icons

    • Replace raw emoji Icon.Source values with generated data:image/svg+xml,... URIs.
    • Preserve the same visible glyphs (📊, 📋, 🔍, etc.) while making the icon payload valid for stricter MCP clients.
    • Centralize icon generation in a small helper so all tool registrations stay consistent.
  • Focused test coverage

    • Add a unit test for inspector client version wiring.
    • Add a unit test for SVG data-URI icon generation.
    • Update MCP server icon expectations to assert the new URI form.

Example of the new icon encoding approach:

func mcpToolIcons(emoji string) []mcp.Icon {
	return []mcp.Icon{{Source: mcpEmojiIconSource(emoji)}}
}

func mcpEmojiIconSource(emoji string) string {
	svg := fmt.Sprintf(
		`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><text x="16" y="24" font-size="24" text-anchor="middle">%s</text></svg>`,
		emoji,
	)
	return "data:image/svg+xml," + url.PathEscape(svg)
}

Copilot AI and others added 2 commits July 14, 2026 11:21
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Review Go module modelcontextprotocol/go-sdk Use live gh-aw version for MCP inspector and make tool icons spec-compliant Jul 14, 2026
Copilot AI requested a review from pelikhan July 14, 2026 11:34
@pelikhan pelikhan marked this pull request as ready for review July 14, 2026 11:42
Copilot AI review requested due to automatic review settings July 14, 2026 11:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns MCP client metadata and tool icons with protocol expectations.

Changes:

  • Uses the live CLI version for MCP inspector clients.
  • Centralizes MCP tool icon generation and updates tests.
  • Changes the generated auto-upgrade schedule.
Show a summary per file
File Description
pkg/cli/mcp_tools_readonly.go Uses shared icon generation.
pkg/cli/mcp_tools_privileged.go Uses shared icon generation.
pkg/cli/mcp_tools_management.go Uses shared icon generation.
pkg/cli/mcp_tool_icons.go Generates SVG data-URI icons.
pkg/cli/mcp_server_tools_test.go Updates icon expectations.
pkg/cli/mcp_inspect_test.go Tests version and icon generation.
pkg/cli/mcp_inspect_mcp.go Reports the live CLI version.
.github/workflows/agentic-auto-upgrade.yml Changes the weekly execution time.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 8/8 changed files
  • Comments generated: 2
  • Review effort level: Medium

Comment thread pkg/cli/mcp_tool_icons.go Outdated

func mcpEmojiIconSource(emoji string) string {
svg := fmt.Sprintf(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><text x="16" y="24" font-size="24" text-anchor="middle">%s</text></svg>`, emoji)
return "data:image/svg+xml," + url.PathEscape(svg)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted in the latest commit. The cron is back to "21 3 * * 5" (Friday) as it was on the base branch.

Comment thread .github/workflows/agentic-auto-upgrade.yml Outdated
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill and address these unresolved review threads:

Generated by 👨‍🍳 PR Sous Chef · 14.8 AIC · ⌖ 7.41 AIC · ⊞ 7.5K ·
Comment /souschef to run again

- Switch mcpEmojiIconSource from percent-encoding to base64 encoding
  so the data:image/svg+xml;base64, URI form is used, which is more
  broadly accepted by strict MCP clients.
- Update TestMCPEmojiIconSource_ReturnsDataURI to assert base64 prefix
  and decode with base64.StdEncoding instead of url.PathUnescape.
- Revert the unrelated cron schedule change in agentic-auto-upgrade.yml
  back to the original "21 3 * * 5" (Friday).

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot AI requested a review from gh-aw-bot July 14, 2026 12:11
@pelikhan pelikhan merged commit 7a77558 into main Jul 14, 2026
44 checks passed
@pelikhan pelikhan deleted the copilot/go-fan-go-module-review branch July 14, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[go-fan] Go Module Review: modelcontextprotocol/go-sdk

5 participants