[Server] Add support for icons on explicit builder registration and attributes#142
Conversation
There was a problem hiding this comment.
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
iconsparameter to builder registration methods (addTool,addResource,addPrompt) - Updated capability attributes (
McpTool,McpResource,McpPrompt) to include optionaliconsfield - 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.
4cf59a8 to
b5164c1
Compare
905a0d0 to
77e5d8a
Compare
|
Great stuff, @chr-hertel. |
77e5d8a to
f8121bc
Compare
There was a problem hiding this comment.
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>
Follow #141
needs some testing still => decided on reusing existing examples of bringing in more