Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPrompts ¶
addPrompts registers a collection of prompts with the MCP server and logs the registration.
func RegisterPrompts ¶
RegisterPrompts initializes and registers predefined prompts with the MCP server. This is a convenience function that uses the default PromptRegistrar implementation. For backward compatibility, this function delegates to the interface-based implementation.
Types ¶
type BasePromptRegistrar ¶
type BasePromptRegistrar struct{}
func (*BasePromptRegistrar) RegisterCommonPrompts ¶
func (b *BasePromptRegistrar) RegisterCommonPrompts(prompts *Prompts)
registerCommonPrompts adds prompts that are common to both internal and external modes. This method can be called by derived implementations to include common prompts.
func (*BasePromptRegistrar) RegisterPrompts ¶
func (b *BasePromptRegistrar) RegisterPrompts(mcpServer *server.MCPServer)
RegisterPrompts registers common prompts available in both internal and external modes.
type Prompt ¶
type Prompt struct {
Name string
Description string
ResultDescription string
Text string
Role Role
}
Prompt represents the prompt data needed to add to the MCP server.
func NewPrompt ¶
func NewPrompt() *Prompt
NewPrompt creates a new Prompt instance with default values.
func (*Prompt) Build ¶
Build constructs and returns a new Prompt instance based on the current state.
func (*Prompt) SetDescription ¶
SetDescription sets the description of the prompt and returns the updated Prompt instance.
func (*Prompt) SetName ¶
SetName sets the name of the prompt and returns the updated Prompt instance.
func (*Prompt) SetResultDescription ¶
SetResultDescription sets the result description of the prompt and returns the updated Prompt instance.
type PromptRegistrar ¶
PromptRegistrar defines the interface for registering prompts with the MCP server. This interface allows different implementations for internal and external repos.
func NewPromptRegistrar ¶
func NewPromptRegistrar() PromptRegistrar
NewPromptRegistrar creates a new prompt registrar.