class

ActionController::MCPServer::Description

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

the toolboxes available to MCP clients, typically saved as mcp.yml

Constructors

new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
Source
new(pull : JSON::PullParser)
Source
new(toolboxes : Array(ActionController::MCPServer::Toolbox) = [] of Toolbox, endpoints : Array(ActionController::MCPServer::Endpoint) = [] of Endpoint)
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

Instance methods

composition_id

Detects descriptions generated for a different application composition.

Source
composition_id=(composition_id : String | Nil)

Detects descriptions generated for a different application composition.

Source
endpoint?(path : String) : Endpoint | Nil

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

Source
endpoints

controllers served as their own MCP server, see ActionController::MCP

Source
prompt?(name : String) : Tuple(Toolbox, Prompt) | Nil

returns the prompt and the toolbox it belongs to

Source
prompts?
Source
resource?(uri : String) : Tuple(Tool, Hash(String, String)) | Nil

the resource tool whose template matches the URI, and the template variables

Source
resource_tools

the tools that are readable as resource templates, the most specific templates first

Source
root_prompts

the prompts available without opening a toolbox

Source
root_tools

the tools available without opening a toolbox

Source
subscriptions?

true if any resource template can be subscribed to

Source
tool?(name : String) : Tuple(Toolbox, Tool) | Nil

returns the tool and the toolbox it belongs to

Source
toolbox?(name : String) : Toolbox | Nil
Source
toolboxes
Source
ui?

true if any tool renders an MCP Apps card

Source