elicitation

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: GPL-3.0 Imports: 2 Imported by: 0 modules, 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

Overview

Package elicitation provides typed structures for MCP elicitation handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action string

Action identifies the SDK consumer's response to an elicitation request.

const (
	// ActionAccept accepts the elicitation and optionally returns content.
	ActionAccept Action = "accept"
	// ActionDecline declines the elicitation.
	ActionDecline Action = "decline"
	// ActionCancel cancels the elicitation flow.
	ActionCancel Action = "cancel"
)

type Callback

type Callback func(ctx context.Context, req *Request) (*Response, error)

Callback handles an MCP elicitation request.

type Mode

type Mode string

Mode identifies the elicitation UX expected by the CLI.

const (
	// ModeForm requests a form-style elicitation.
	ModeForm Mode = "form"
	// ModeURL requests a URL-based elicitation.
	ModeURL Mode = "url"
)

type Request

type Request struct {
	MCPServerName   string
	Message         string
	Mode            *Mode
	URL             *string
	ElicitationID   *string
	RequestedSchema map[string]any
	ThreadID        string
	TurnID          *string
	Audit           *message.AuditEnvelope `json:"-"`
}

Request contains an MCP elicitation request from the CLI.

type Response

type Response struct {
	Action  Action
	Content map[string]any
	Audit   *message.AuditEnvelope `json:"-"`
}

Response contains the SDK consumer's elicitation decision.

Jump to

Keyboard shortcuts

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