ActionController::MCPServer::Invoker
Inherits Reference < Object
dispatches tool calls and prompts to the application routes in-process
Constructors
prompts are internal routes, not accessible via HTTP
Instance methods
runs the route and returns a CallToolResult JSON string.
raises Unauthorized if authentication is enabled and the route responds with a 401
bound path params, from an endpoint URL, take precedence over the arguments
runs a long running route, its response is spooled to disk and streamed as the
CallToolResult. A String result is an error
raises Unauthorized if authentication is enabled and the route responds with a 401
runs the request through the application routes in-process
runs the route, writing its response to a temporary file
the credential headers copied from the MCP request
renders the prompt and returns a GetPromptResult JSON string
raises RPCError if the prompt can't be rendered and Unauthorized if
authentication is enabled and the prompt responds with a 401
runs an endpoint controller's instructions method, an internal route, returning the
instructions for the session
raises RPCError if it fails and Unauthorized if authentication is enabled and it
responds with a 401
requests the route provided with the forwarded credentials, returning true on success
reads a resource by requesting its route, returning a ReadResourceResult JSON
string, or a StreamedResult for long running routes.
raises RPCError if the resource can't be read and Unauthorized if
authentication is enabled and the route responds with a 401
true if the resource can be read with the request's credentials