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, meta: nil) ⇒ SdkMcpTool

Returns a new instance of SdkMcpTool.



1851
1852
1853
1854
1855
1856
1857
1858
# File 'lib/claude_agent_sdk/types.rb', line 1851

def initialize(name:, description:, input_schema:, handler:, annotations: nil, meta: nil)
  @name = name
  @description = description
  @input_schema = input_schema
  @handler = handler
  @annotations = annotations # MCP tool annotations (e.g., { title: '...', readOnlyHint: true })
  @meta = meta # MCP _meta field (e.g., { 'anthropic/maxResultSizeChars' => 100000 })
end

Instance Attribute Details

#annotationsObject

Returns the value of attribute annotations.



1849
1850
1851
# File 'lib/claude_agent_sdk/types.rb', line 1849

def annotations
  @annotations
end

#descriptionObject

Returns the value of attribute description.



1849
1850
1851
# File 'lib/claude_agent_sdk/types.rb', line 1849

def description
  @description
end

#handlerObject

Returns the value of attribute handler.



1849
1850
1851
# File 'lib/claude_agent_sdk/types.rb', line 1849

def handler
  @handler
end

#input_schemaObject

Returns the value of attribute input_schema.



1849
1850
1851
# File 'lib/claude_agent_sdk/types.rb', line 1849

def input_schema
  @input_schema
end

#metaObject

Returns the value of attribute meta.



1849
1850
1851
# File 'lib/claude_agent_sdk/types.rb', line 1849

def meta
  @meta
end

#nameObject

Returns the value of attribute name.



1849
1850
1851
# File 'lib/claude_agent_sdk/types.rb', line 1849

def name
  @name
end