Class: SolidLoop::McpTool

Inherits:
ApplicationRecord show all
Defined in:
app/models/solid_loop/mcp_tool.rb

Instance Method Summary collapse

Instance Method Details

#call(agent:, arguments:, tool_call: nil) ⇒ Object



22
23
24
# File 'app/models/solid_loop/mcp_tool.rb', line 22

def call(agent:, arguments:, tool_call: nil)
  SolidLoop::McpToolExecutionService.new(self, agent, tool_call: tool_call).call(arguments)
end

#to_tool_specObject



11
12
13
14
15
16
17
18
19
20
# File 'app/models/solid_loop/mcp_tool.rb', line 11

def to_tool_spec
  {
    type: "function",
    function: {
      name: name,
      description: description,
      parameters: input_schema
    }
  }
end