Skip to content

Conversation

@chr-hertel
Copy link
Member

@chr-hertel chr-hertel commented Nov 9, 2025

Follow #141

needs some testing still => decided on reusing existing examples of bringing in more

@chr-hertel chr-hertel added the Server Issues & PRs related to the Server component label Nov 9, 2025
@chr-hertel chr-hertel requested a review from Copilot November 9, 2025 16:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for icons on tools, resources, and prompts through explicit builder registration and attribute-based discovery. This enhancement allows developers to associate visual icons with their MCP capabilities.

Key Changes

  • Added icons parameter to builder registration methods (addTool, addResource, addPrompt)
  • Updated capability attributes (McpTool, McpResource, McpPrompt) to include optional icons field
  • Modified loader and discoverer to handle icons during capability registration

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Server/Builder.php Added icons parameter to tool, resource, and prompt registration methods and updated PHPDoc blocks
src/Capability/Registry/Loader/ArrayLoader.php Updated loader to pass icons to capability constructors and added readonly modifiers to constructor properties
src/Capability/Discovery/Discoverer.php Modified discoverer to extract and use icons from attributes when creating capabilities
src/Capability/Attribute/McpTool.php Added icons property to tool attribute
src/Capability/Attribute/McpResource.php Added icons property to resource attribute
src/Capability/Attribute/McpPrompt.php Added icons property to prompt attribute

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

@chr-hertel chr-hertel force-pushed the fix-icon-registration branch from 4cf59a8 to b5164c1 Compare November 9, 2025 17:11
@chr-hertel chr-hertel force-pushed the fix-icon-registration branch 3 times, most recently from 905a0d0 to 77e5d8a Compare November 12, 2025 20:25
@CodeWithKyrian
Copy link
Contributor

Great stuff, @chr-hertel.
Any chance you could include the docs update in this PR too?

@chr-hertel chr-hertel force-pushed the fix-icon-registration branch from 77e5d8a to f8121bc Compare November 13, 2025 21:16
@chr-hertel chr-hertel requested a review from Copilot November 13, 2025 21:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.


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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@chr-hertel chr-hertel merged commit 056c7b6 into main Nov 13, 2025
12 checks passed
@chr-hertel chr-hertel deleted the fix-icon-registration branch November 13, 2025 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Server Issues & PRs related to the Server component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants