Class: StimulusPlumbers::MCP::Plugins::Aria

Inherits:
Base
  • Object
show all
Defined in:
lib/stimulus_plumbers/mcp/plugins/aria.rb

Class Method Summary collapse

Methods inherited from Base

dynamic_resource_templates, json_resource, not_found, register_tools, text_resource, text_tool

Class Method Details

.loaderObject



12
13
14
# File 'lib/stimulus_plumbers/mcp/plugins/aria.rb', line 12

def loader
  AriaLoader
end

.loader_keyObject



8
9
10
# File 'lib/stimulus_plumbers/mcp/plugins/aria.rb', line 8

def loader_key
  :aria
end

.read(uri, store) ⇒ Object



29
30
31
32
33
# File 'lib/stimulus_plumbers/mcp/plugins/aria.rb', line 29

def read(uri, store)
  return unless uri == "aria://reference"

  text_resource(uri, "text/markdown", store[:aria])
end

.static_resourcesObject



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/stimulus_plumbers/mcp/plugins/aria.rb', line 16

def static_resources
  [
    ::MCP::Resource.new(
      uri:         "aria://reference",
      name:        "aria-reference",
      description: "WCAG 2.1 AA criteria, JS keyboard navigation patterns, and per-component ARIA " \
                   "patterns for this library. For generic ARIA role/WCAG technique reference not " \
                   "specific to this library, use the MDN MCP server (https://developer.mozilla.org/en-US/mcp)",
      mime_type:   "text/markdown"
    )
  ].freeze
end