class

ActionController::MCPServer::Endpoint

Inherits YAML::Serializable < JSON::Serializable < Reference < Object

a controller served as its own MCP server, @[AC::MCP(endpoint: true)]. Every tool and prompt is listed, there are no toolboxes to open

Constructors

new(path : String, bound : Array(String), toolbox : ActionController::MCPServer::Toolbox, instructions_path : Nil | String = nil)
Source
new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
Source
new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Source

Class methods

bound_params(path : String) : Array(String)

the path params in a path template

Source

Instance methods

bound

the path params bound from the endpoint URL, removed from the tool arguments

Source
description

the endpoint as a description with a single toolbox of root items

Source
instructions

the controller doc comment, used as the server instructions

Source
instructions_path

the internal route of the controller's instructions method, which builds the instructions for each session, i.e. /accounts/:account_id/__mcp_instructions__

Source
name

the toolbox name, used as the server name

Source
path

the path template the endpoint is served at, i.e. /accounts/:account_id/mcp

Source
toolbox

the endpoint's tools and prompts, all of them root items

Source