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.



1429
1430
1431
1432
1433
# File 'lib/claude_agent_sdk/types.rb', line 1429

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

Instance Attribute Details

#annotationsObject

Returns the value of attribute annotations.



1427
1428
1429
# File 'lib/claude_agent_sdk/types.rb', line 1427

def annotations
  @annotations
end

#descriptionObject

Returns the value of attribute description.



1427
1428
1429
# File 'lib/claude_agent_sdk/types.rb', line 1427

def description
  @description
end

#nameObject

Returns the value of attribute name.



1427
1428
1429
# File 'lib/claude_agent_sdk/types.rb', line 1427

def name
  @name
end

Class Method Details

.parse(data) ⇒ Object



1435
1436
1437
1438
1439
1440
1441
# File 'lib/claude_agent_sdk/types.rb', line 1435

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