Class: ClaudeAgentSDK::McpToolInfo

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

Overview

MCP tool info (name, description, annotations)

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, description: nil, annotations: nil) ⇒ McpToolInfo

Returns a new instance of McpToolInfo.



1459
1460
1461
1462
1463
# File 'lib/claude_agent_sdk/types.rb', line 1459

def initialize(name:, description: nil, annotations: nil)
  @name = name
  @description = description
  @annotations = annotations
end

Instance Attribute Details

#annotationsObject

Returns the value of attribute annotations.



1457
1458
1459
# File 'lib/claude_agent_sdk/types.rb', line 1457

def annotations
  @annotations
end

#descriptionObject

Returns the value of attribute description.



1457
1458
1459
# File 'lib/claude_agent_sdk/types.rb', line 1457

def description
  @description
end

#nameObject

Returns the value of attribute name.



1457
1458
1459
# File 'lib/claude_agent_sdk/types.rb', line 1457

def name
  @name
end

Class Method Details

.parse(data) ⇒ Object



1465
1466
1467
1468
1469
1470
1471
# File 'lib/claude_agent_sdk/types.rb', line 1465

def self.parse(data)
  new(
    name: data[:name],
    description: data[:description],
    annotations: McpToolAnnotations.parse(data[:annotations])
  )
end