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.
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 = # MCP _meta field (e.g., { 'anthropic/maxResultSizeChars' => 100000 }) end |
Instance Attribute Details
#annotations ⇒ Object
Returns the value of attribute annotations.
1849 1850 1851 |
# File 'lib/claude_agent_sdk/types.rb', line 1849 def annotations @annotations end |
#description ⇒ Object
Returns the value of attribute description.
1849 1850 1851 |
# File 'lib/claude_agent_sdk/types.rb', line 1849 def description @description end |
#handler ⇒ Object
Returns the value of attribute handler.
1849 1850 1851 |
# File 'lib/claude_agent_sdk/types.rb', line 1849 def handler @handler end |
#input_schema ⇒ Object
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 |
#meta ⇒ Object
Returns the value of attribute meta.
1849 1850 1851 |
# File 'lib/claude_agent_sdk/types.rb', line 1849 def @meta end |
#name ⇒ Object
Returns the value of attribute name.
1849 1850 1851 |
# File 'lib/claude_agent_sdk/types.rb', line 1849 def name @name end |