class ActionController::MCPServer::Description

Overview

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

Included Modules

Extended Modules

Defined in:

action-controller/mcp/description.cr

Constructors

Instance Method Summary

Constructor Detail

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

[View source]
def self.new(pull : JSON::PullParser) #

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

[View source]

Instance Method Detail

def composition_id : String | Nil #

Detects descriptions generated for a different application composition.


[View source]
def composition_id=(composition_id : String | Nil) #

Detects descriptions generated for a different application composition.


[View source]
def endpoint?(path : String) : Endpoint | Nil #

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


[View source]
def endpoints : Array(Endpoint) #

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


[View source]
def prompt?(name : String) : Tuple(Toolbox, Prompt) | Nil #

returns the prompt and the toolbox it belongs to


[View source]
def prompts? : Bool #

[View source]
def resource?(uri : String) : Tuple(Tool, Hash(String, String)) | Nil #

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


[View source]
def resource_tools : Array(Tool) #

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


[View source]
def root_prompts : Array(Prompt) #

the prompts available without opening a toolbox


[View source]
def root_tools : Array(Tool) #

the tools available without opening a toolbox


[View source]
def subscriptions? : Bool #

true if any resource template can be subscribed to


[View source]
def tool?(name : String) : Tuple(Toolbox, Tool) | Nil #

returns the tool and the toolbox it belongs to


[View source]
def toolbox?(name : String) : Toolbox | Nil #

[View source]
def toolboxes : Array(Toolbox) #

[View source]
def ui? : Bool #

true if any tool renders an MCP Apps card


[View source]