prompts

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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