Class: Jazari::Mcp::Actions::Action

Inherits:
Data
  • Object
show all
Defined in:
lib/jazari/mcp/actions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#confirm ⇒ Object (readonly)

Returns the value of attribute confirm

Returns:

  • (Object) —

    the current value of confirm



43
44
45
# File 'lib/jazari/mcp/actions.rb', line 43

def confirm
  @confirm
end

#effect ⇒ Object (readonly)

Returns the value of attribute effect

Returns:

  • (Object) —

    the current value of effect



43
44
45
# File 'lib/jazari/mcp/actions.rb', line 43

def effect
  @effect
end

#name ⇒ Object (readonly)

Returns the value of attribute name

Returns:

  • (Object) —

    the current value of name



43
44
45
# File 'lib/jazari/mcp/actions.rb', line 43

def name
  @name
end

#params ⇒ Object (readonly)

Returns the value of attribute params

Returns:

  • (Object) —

    the current value of params



43
44
45
# File 'lib/jazari/mcp/actions.rb', line 43

def params
  @params
end

#scope ⇒ Object (readonly)

Returns the value of attribute scope

Returns:

  • (Object) —

    the current value of scope



43
44
45
# File 'lib/jazari/mcp/actions.rb', line 43

def scope
  @scope
end

#summary ⇒ Object (readonly)

Returns the value of attribute summary

Returns:

  • (Object) —

    the current value of summary



43
44
45
# File 'lib/jazari/mcp/actions.rb', line 43

def summary
  @summary
end

Instance Method Details

#confirm? ⇒ Boolean

Returns:

  • (Boolean)


45
# File 'lib/jazari/mcp/actions.rb', line 45

def confirm? = confirm == true

#read? ⇒ Boolean

Returns:

  • (Boolean)


44
# File 'lib/jazari/mcp/actions.rb', line 44

def read? = scope == :read

#required ⇒ Object



46
# File 'lib/jazari/mcp/actions.rb', line 46

def required = REQUIRED_ARGUMENTS.fetch(name)

#to_h ⇒ Object



47
48
# File 'lib/jazari/mcp/actions.rb', line 47

def to_h = { name: name, scope: scope, effect: effect, summary: summary,
params: params, confirm: confirm }