class

Prompt

Inherits YAML::Serializable::Strict < YAML::Serializable < Reference < Object

Model Context Protocol (MCP) prompt.

Constants

Log = ::Log.for(self)

Constructors

find(name : String) : Prompt

Finds prompt by name.

Raises exception if not found.

Source
new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
Source
new(name : String, title : String | Nil = nil, description : String | Nil = nil, arguments : Array(Prompt::Argument) = [] of Argument, messages : Array(Prompt::Message) = [] of Message)
Source
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Source

Class methods

all

Returns all prompts.

Load prompts if cache is empty or outdated.

Source
find?(name : String) : Prompt | Nil

Finds prompt by name.

Returns nil if not found.

Source
substitute(template : String, arguments : Hash(String, String), context : Hash(String, String)) : String

Substitutes variables in templates.

Source

Instance methods

arguments
Source
description
Source
messages
Source
name
Source
title
Source

Nested types