prompts

package
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

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

type PromptContent struct {
	Type string `json:"type"`
	Text string `json:"text"`
}

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

func (*VerifyPrompt) Get

func (p *VerifyPrompt) Get(args map[string]string) (GetResult, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL