Class: ClaudeAgentSDK::McpToolInfo
- Inherits:
-
Object
- Object
- ClaudeAgentSDK::McpToolInfo
- Defined in:
- lib/claude_agent_sdk/types.rb
Overview
MCP tool info (name, description, annotations)
Instance Attribute Summary collapse
-
#annotations ⇒ Object
Returns the value of attribute annotations.
-
#description ⇒ Object
Returns the value of attribute description.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, description: nil, annotations: nil) ⇒ McpToolInfo
constructor
A new instance of McpToolInfo.
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
#annotations ⇒ Object
Returns the value of attribute annotations.
1406 1407 1408 |
# File 'lib/claude_agent_sdk/types.rb', line 1406 def annotations @annotations end |
#description ⇒ Object
Returns the value of attribute description.
1406 1407 1408 |
# File 'lib/claude_agent_sdk/types.rb', line 1406 def description @description end |
#name ⇒ Object
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 |