Class: OmnifocusMcp::Tools::Definitions::McpEnvelope::ToolReply

Inherits:
Data
  • Object
show all
Defined in:
lib/omnifocus_mcp/tools/definitions/mcp_envelope.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



7
8
9
# File 'lib/omnifocus_mcp/tools/definitions/mcp_envelope.rb', line 7

def error
  @error
end

#textObject (readonly)

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



7
8
9
# File 'lib/omnifocus_mcp/tools/definitions/mcp_envelope.rb', line 7

def text
  @text
end

Class Method Details

.failure(text) ⇒ Object



11
# File 'lib/omnifocus_mcp/tools/definitions/mcp_envelope.rb', line 11

def self.failure(text) = new(text: text, error: true)

.success(text) ⇒ Object



10
# File 'lib/omnifocus_mcp/tools/definitions/mcp_envelope.rb', line 10

def self.success(text) = new(text: text, error: false)

Instance Method Details

#to_envelopeObject



8
# File 'lib/omnifocus_mcp/tools/definitions/mcp_envelope.rb', line 8

def to_envelope = error ? McpEnvelope.text_error(text) : McpEnvelope.text_result(text)