class

ModelContextProtocol::Server::Prompt

Inherits JSON::Serializable < Reference < Object

Base class for MCP Prompts

Constructors

new(name : String, template : String, description : String, args : Hash(String, JSON::Any) = {} of String => JSON::Any, required_args : Array(String) = [] of String)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

args
Source
args=(args : Hash(String, JSON::Any))
Source
description
Source
description=(description : String)
Source
name
Source
name=(name : String)
Source
render(values : Hash(String, JSON::Any)) : String

Render the prompt template with given values

Source
required_args
Source
required_args=(required_args : Array(String))
Source
template
Source
template=(template : String)
Source