Skip to content

class ActionController::MCPServer::Prompt
inherits Reference #

a controller method exposed as a prompt, see ActionController::MCP

Included modules

JSON::Serializable YAML::Serializable

Extended modules

JSON::Schema

Constructors#

.new(name : String, description : Nil | String, path : String, arguments : Array(ActionController::MCPServer::PromptArgument), root : Bool = false, title : Nil | String = nil, icons : Nil | Array(JSON::Any) = nil)#

View source

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

View source

.new(pull : JSON::PullParser)#

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#

#arguments : Array(PromptArgument)#

View source

#description : String | ::Nil#

View source

#icons : Array(JSON::Any) | ::Nil#

icons, src as written, see Icons

View source

#name : String#

View source

#path : String#

the internal route that renders the prompt

View source

#root? : Bool#

always available, without opening the toolbox

View source

#title : String | ::Nil#

the display name

View source

#to_mcp_json(json : JSON::Builder, host : String | Nil = nil, bound : Hash(String, String) | Nil = nil) : Nil#

the prompt definition as returned by prompts/list, host resolves icon paths

View source