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

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

Overview

effect drives how a host should annotate the action to its clients:

:read        — no writes
:additive    — writes, but cannot destroy prior state
:overwrite   — may replace an operator's content; annotate cautiously
:destructive — removes something; gate it

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#confirmObject (readonly)

Returns the value of attribute confirm

Returns:

  • (Object)

    the current value of confirm



22
23
24
# File 'lib/jazari/mcp/actions.rb', line 22

def confirm
  @confirm
end

#effectObject (readonly)

Returns the value of attribute effect

Returns:

  • (Object)

    the current value of effect



22
23
24
# File 'lib/jazari/mcp/actions.rb', line 22

def effect
  @effect
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



22
23
24
# File 'lib/jazari/mcp/actions.rb', line 22

def name
  @name
end

#paramsObject (readonly)

Returns the value of attribute params

Returns:

  • (Object)

    the current value of params



22
23
24
# File 'lib/jazari/mcp/actions.rb', line 22

def params
  @params
end

#scopeObject (readonly)

Returns the value of attribute scope

Returns:

  • (Object)

    the current value of scope



22
23
24
# File 'lib/jazari/mcp/actions.rb', line 22

def scope
  @scope
end

#summaryObject (readonly)

Returns the value of attribute summary

Returns:

  • (Object)

    the current value of summary



22
23
24
# File 'lib/jazari/mcp/actions.rb', line 22

def summary
  @summary
end

Instance Method Details

#confirm?Boolean

Returns:

  • (Boolean)


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

def confirm? = confirm == true

#read?Boolean

Returns:

  • (Boolean)


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

def read? = scope == :read

#to_hObject



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

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