Class: ClaudeAgentSDK::SdkMcpTool
- Inherits:
-
Object
- Object
- ClaudeAgentSDK::SdkMcpTool
- Defined in:
- lib/claude_agent_sdk/types.rb
Overview
SDK MCP Tool definition
Instance Attribute Summary collapse
-
#annotations ⇒ Object
Returns the value of attribute annotations.
-
#description ⇒ Object
Returns the value of attribute description.
-
#handler ⇒ Object
Returns the value of attribute handler.
-
#input_schema ⇒ Object
Returns the value of attribute input_schema.
-
#meta ⇒ Object
Returns the value of attribute meta.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name:, description:, input_schema:, handler:, annotations: nil, meta: nil) ⇒ SdkMcpTool
constructor
A new instance of SdkMcpTool.
Constructor Details
#initialize(name:, description:, input_schema:, handler:, annotations: nil, meta: nil) ⇒ SdkMcpTool
Returns a new instance of SdkMcpTool.
1872 1873 1874 1875 1876 1877 1878 1879 |
# File 'lib/claude_agent_sdk/types.rb', line 1872 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 = # MCP _meta field (e.g., { 'anthropic/maxResultSizeChars' => 100000 }) end |
Instance Attribute Details
#annotations ⇒ Object
Returns the value of attribute annotations.
1870 1871 1872 |
# File 'lib/claude_agent_sdk/types.rb', line 1870 def annotations @annotations end |
#description ⇒ Object
Returns the value of attribute description.
1870 1871 1872 |
# File 'lib/claude_agent_sdk/types.rb', line 1870 def description @description end |
#handler ⇒ Object
Returns the value of attribute handler.
1870 1871 1872 |
# File 'lib/claude_agent_sdk/types.rb', line 1870 def handler @handler end |
#input_schema ⇒ Object
Returns the value of attribute input_schema.
1870 1871 1872 |
# File 'lib/claude_agent_sdk/types.rb', line 1870 def input_schema @input_schema end |
#meta ⇒ Object
Returns the value of attribute meta.
1870 1871 1872 |
# File 'lib/claude_agent_sdk/types.rb', line 1870 def @meta end |
#name ⇒ Object
Returns the value of attribute name.
1870 1871 1872 |
# File 'lib/claude_agent_sdk/types.rb', line 1870 def name @name end |