Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetResult ¶
type GetResult struct {
Description string `json:"description,omitempty"`
Messages []PromptMessage `json:"messages"`
}
GetResult is the prompts/get response payload.
type Prompt ¶
type Prompt interface {
Definition() PromptDefinition
Get(args map[string]string) (GetResult, error)
}
Prompt interface for MCP prompts.
A prompt is a named, user-invocable piece of text a client can surface as a command. Unlike a tool, the server does not act on it: it returns messages for the model to follow.
type PromptArgument ¶
type PromptArgument struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Required bool `json:"required,omitempty"`
}
PromptArgument describes one argument a prompt accepts.
type PromptContent ¶
PromptContent holds the message body. Only text content is supported.
type PromptDefinition ¶
type PromptDefinition struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Arguments []PromptArgument `json:"arguments,omitempty"`
}
PromptDefinition describes an MCP prompt as returned by prompts/list.
type PromptMessage ¶
type PromptMessage struct {
Role string `json:"role"`
Content PromptContent `json:"content"`
}
PromptMessage is a single message in a prompt's result.
type VerifyPrompt ¶
type VerifyPrompt struct{}
VerifyPrompt exposes the verification loop as a user-invocable prompt.
func NewVerifyPrompt ¶
func NewVerifyPrompt() *VerifyPrompt
NewVerifyPrompt creates the verification loop prompt.
func (*VerifyPrompt) Definition ¶
func (p *VerifyPrompt) Definition() PromptDefinition