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.



1408
1409
1410
1411
1412
# File 'lib/claude_agent_sdk/types.rb', line 1408

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

Instance Attribute Details

#annotationsObject

Returns the value of attribute annotations.



1406
1407
1408
# File 'lib/claude_agent_sdk/types.rb', line 1406

def annotations
  @annotations
end

#descriptionObject

Returns the value of attribute description.



1406
1407
1408
# File 'lib/claude_agent_sdk/types.rb', line 1406

def description
  @description
end

#nameObject

Returns the value of attribute name.



1406
1407
1408
# File 'lib/claude_agent_sdk/types.rb', line 1406

def name
  @name
end

Class Method Details

.parse(data) ⇒ Object



1414
1415
1416
1417
1418
1419
1420
# File 'lib/claude_agent_sdk/types.rb', line 1414

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