class
ActionController::MCPServer::Prompt
- ActionController::MCPServer::Prompt
- Reference
- Object
Overview
a controller method exposed as a prompt, see ActionController::MCP
Included Modules
- JSON::Serializable
- YAML::Serializable
Extended Modules
- JSON::Schema
Defined in:
action-controller/mcp/description.crConstructors
- .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)
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
- .new(pull : JSON::PullParser)
Instance Method Summary
- #arguments : Array(PromptArgument)
- #description : String | Nil
-
#icons : Array(JSON::Any) | Nil
icons,
srcas written, seeIcons - #name : String
-
#path : String
the internal route that renders the prompt
-
#root? : Bool
always available, without opening the toolbox
-
#title : String | Nil
the display name
-
#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,hostresolves icon paths
Constructor Detail
def self.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)
#
Instance Method Detail
def 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