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



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

def loader = AriaLoader

.loader_keyObject



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

def loader_key = :aria

.read(uri, store) ⇒ Object



25
26
27
28
29
# File 'lib/stimulus_plumbers/mcp/plugins/aria.rb', line 25

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

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

.static_resourcesObject



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/stimulus_plumbers/mcp/plugins/aria.rb', line 12

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