Skip to content

class ActionController::MCPServer::Description
inherits Reference #

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

Included modules

JSON::Serializable YAML::Serializable

Extended modules

JSON::Schema

Constructors#

.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)#

View source

.new(pull : JSON::PullParser)#

View source

.new(toolboxes : Array(ActionController::MCPServer::Toolbox) = [] of Toolbox, endpoints : Array(ActionController::MCPServer::Endpoint) = [] of Endpoint)#

View source

.new(*, __pull_for_json_serializable pull : JSON::PullParser)#

View source

.new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)#

View source

Methods#

#composition_id : String | ::Nil#

Detects descriptions generated for a different application composition.

View source

#composition_id=(composition_id : String | Nil)#

Detects descriptions generated for a different application composition.

View source

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

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

View source

#endpoints : Array(Endpoint)#

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

View source

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

returns the prompt and the toolbox it belongs to

View source

#prompts? : Bool#

View source

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

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

View source

#resource_tools : Array(Tool)#

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

View source

#root_prompts : Array(Prompt)#

the prompts available without opening a toolbox

View source

#root_tools : Array(Tool)#

the tools available without opening a toolbox

View source

#subscriptions? : Bool#

true if any resource template can be subscribed to

View source

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

returns the tool and the toolbox it belongs to

View source

#toolbox?(name : String) : Toolbox | Nil#

View source

#toolboxes : Array(Toolbox)#

View source

#ui? : Bool#

true if any tool renders an MCP Apps card

View source