Class: ActiveMcp::BaseController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/active_mcp/base_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



9
10
11
12
13
14
15
16
17
18
# File 'app/controllers/active_mcp/base_controller.rb', line 9

def index
  case params[:method]
  when Method::TOOLS_LIST
    render_tools_list
  when Method::TOOLS_CALL
    call_tool(params)
  else
    render json: {error: "Method not found: #{params[:method]}"}, status: 404
  end
end