Class: ClaudeAgentSDK::ToolResultBlock

Inherits:
Object
  • Object
show all
Defined in:
lib/claude_agent_sdk/types.rb

Overview

Tool result content block

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tool_use_id:, content: nil, is_error: nil) ⇒ ToolResultBlock

Returns a new instance of ToolResultBlock.



73
74
75
76
77
# File 'lib/claude_agent_sdk/types.rb', line 73

def initialize(tool_use_id:, content: nil, is_error: nil)
  @tool_use_id = tool_use_id
  @content = content
  @is_error = is_error
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



71
72
73
# File 'lib/claude_agent_sdk/types.rb', line 71

def content
  @content
end

#is_errorObject

Returns the value of attribute is_error.



71
72
73
# File 'lib/claude_agent_sdk/types.rb', line 71

def is_error
  @is_error
end

#tool_use_idObject

Returns the value of attribute tool_use_id.



71
72
73
# File 'lib/claude_agent_sdk/types.rb', line 71

def tool_use_id
  @tool_use_id
end