Class: MCP::Client::Tool

Inherits:
Object
  • Object
show all
Defined in:
lib/mcp/client/tool.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, description:, input_schema:, output_schema: nil) ⇒ Tool

Returns a new instance of Tool.



8
9
10
11
12
13
# File 'lib/mcp/client/tool.rb', line 8

def initialize(name:, description:, input_schema:, output_schema: nil)
  @name = name
  @description = description
  @input_schema = input_schema
  @output_schema = output_schema
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



6
7
8
# File 'lib/mcp/client/tool.rb', line 6

def description
  @description
end

#input_schemaObject (readonly)

Returns the value of attribute input_schema.



6
7
8
# File 'lib/mcp/client/tool.rb', line 6

def input_schema
  @input_schema
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/mcp/client/tool.rb', line 6

def name
  @name
end

#output_schemaObject (readonly)

Returns the value of attribute output_schema.



6
7
8
# File 'lib/mcp/client/tool.rb', line 6

def output_schema
  @output_schema
end