Content
View differences
Updated by Jan Sandbrink 5 days ago
MCP tools and resources should be added to a registry, so that plugins can add additional tools and resources in their own initializers, instead of being required to overwrite methods to achieve the same.
E.g. currently all available tools are defined in a method called `all`:
```ruby
def all
[
McpTools::CurrentUser,
McpTools::ListStatuses,
McpTools::ListTypes,
McpTools::SearchPortfolios,
McpTools::SearchPrograms,
McpTools::SearchProjects,
McpTools::SearchUsers,
McpTools::SearchVersions,
McpTools::SearchWorkPackages
]
end
```
Instead they could be registered in an initializer, e.g. like
```ruby
# maybe in single calls
McpTools.register McpTools::CurrentUser
McpTools.register McpTools::ListStatuses
McpTools.register McpTools::ListTypes
# or multiple tools at once
McpTools.register McpTools::SearchPortfolios,
McpTools::SearchPrograms,
McpTools::SearchProjects,
McpTools::SearchUsers,
McpTools::SearchVersions,
McpTools::SearchWorkPackages
```
E.g. currently all available tools are defined in a method called `all`:
```ruby
def all
[
McpTools::CurrentUser,
McpTools::ListStatuses,
McpTools::ListTypes,
McpTools::SearchPortfolios,
McpTools::SearchPrograms,
McpTools::SearchProjects,
McpTools::SearchUsers,
McpTools::SearchVersions,
McpTools::SearchWorkPackages
]
end
```
Instead they could be registered in an initializer, e.g. like
```ruby
# maybe in single calls
McpTools.register McpTools::CurrentUser
McpTools.register McpTools::ListStatuses
McpTools.register McpTools::ListTypes
# or multiple tools at once
McpTools.register McpTools::SearchPortfolios,
McpTools::SearchPrograms,
McpTools::SearchProjects,
McpTools::SearchUsers,
McpTools::SearchVersions,
McpTools::SearchWorkPackages
```