Class: ClaudeAgentSDK::SdkMcpTool

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

Overview

SDK MCP Tool definition

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, description:, input_schema:, handler:, annotations: nil) ⇒ SdkMcpTool

Returns a new instance of SdkMcpTool.



897
898
899
900
901
902
903
# File 'lib/claude_agent_sdk/types.rb', line 897

def initialize(name:, description:, input_schema:, handler:, annotations: nil)
  @name = name
  @description = description
  @input_schema = input_schema
  @handler = handler
  @annotations = annotations # MCP tool annotations (e.g., { title: '...', readOnlyHint: true })
end

Instance Attribute Details

#annotationsObject

Returns the value of attribute annotations.



895
896
897
# File 'lib/claude_agent_sdk/types.rb', line 895

def annotations
  @annotations
end

#descriptionObject

Returns the value of attribute description.



895
896
897
# File 'lib/claude_agent_sdk/types.rb', line 895

def description
  @description
end

#handlerObject

Returns the value of attribute handler.



895
896
897
# File 'lib/claude_agent_sdk/types.rb', line 895

def handler
  @handler
end

#input_schemaObject

Returns the value of attribute input_schema.



895
896
897
# File 'lib/claude_agent_sdk/types.rb', line 895

def input_schema
  @input_schema
end

#nameObject

Returns the value of attribute name.



895
896
897
# File 'lib/claude_agent_sdk/types.rb', line 895

def name
  @name
end