Class: RubyMCP::Requests::PromptsGet

Inherits:
RubyMCP::Request show all
Defined in:
lib/ruby_mcp/requests/prompts_get.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RubyMCP::Request

#id, #initialize, #method

Constructor Details

This class inherits a constructor from RubyMCP::Request

Instance Attribute Details

#jsonObject (readonly)

Returns the value of attribute json.



2
3
4
# File 'lib/ruby_mcp/requests/prompts_get.rb', line 2

def json
  @json
end

Instance Method Details

#allowed_in_lifecycle?(lifecycle) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/ruby_mcp/requests/prompts_get.rb', line 12

def allowed_in_lifecycle?(lifecycle)
  lifecycle.operation_phase?
end

#argumentsObject



8
9
10
# File 'lib/ruby_mcp/requests/prompts_get.rb', line 8

def arguments
  @json.dig("params", "arguments").transform_keys(&:to_sym)
end

#nameObject



4
5
6
# File 'lib/ruby_mcp/requests/prompts_get.rb', line 4

def name
  @json.dig("params", "name")
end