Class: StimulusPlumbers::MCP::Plugins::Icons
- Inherits:
-
Base
- Object
- Base
- StimulusPlumbers::MCP::Plugins::Icons
show all
- Defined in:
- lib/stimulus_plumbers/mcp/plugins/icons.rb
Class Method Summary
collapse
Methods inherited from Base
dynamic_resource_templates, json_resource, not_found, text_resource, text_tool
Class Method Details
.loader ⇒ Object
12
13
14
|
# File 'lib/stimulus_plumbers/mcp/plugins/icons.rb', line 12
def loader
IconsLoader
end
|
.loader_key ⇒ Object
8
9
10
|
# File 'lib/stimulus_plumbers/mcp/plugins/icons.rb', line 8
def loader_key
:icons
end
|
.read(uri, store) ⇒ Object
27
28
29
30
31
|
# File 'lib/stimulus_plumbers/mcp/plugins/icons.rb', line 27
def read(uri, store)
return unless uri == "component://icons"
json_resource(uri, store[:icons])
end
|
33
34
35
36
37
38
39
40
41
|
# File 'lib/stimulus_plumbers/mcp/plugins/icons.rb', line 33
def register_tools(server, store)
text_tool(
server,
name: "list_icons",
description: "Lists all available icon names bundled with the Tailwind theme"
) do
JSON.generate(store[:icons])
end
end
|
.static_resources ⇒ Object
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/stimulus_plumbers/mcp/plugins/icons.rb', line 16
def static_resources
[
::MCP::Resource.new(
uri: "component://icons",
name: "icons",
description: "All available icon names bundled with the Tailwind theme",
mime_type: "application/json"
)
].freeze
end
|