webmcpclient

package
v0.0.0-...-e970762 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoPageTarget   = errors.New("no browser tabs found")
	ErrToolNotFound   = errors.New("WebMCP tool not found")
	ErrOutcomeUnknown = errors.New("WebMCP invocation outcome is unknown")
)

Functions

This section is empty.

Types

type Annotations

type Annotations struct {
	ReadOnly         bool `json:"readOnly"`
	UntrustedContent bool `json:"untrustedContent"`
	Consequential    bool `json:"consequential"`
	Autosubmit       bool `json:"autosubmit"`
}

type InvocationResult

type InvocationResult struct {
	InvocationID string
	Status       string
	Output       any
	ErrorText    string
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(upstream UpstreamManager) *Manager

func (*Manager) Close

func (m *Manager) Close() error

func (*Manager) CustomTool

func (m *Manager) CustomTool(ctx context.Context, toolRef string) (string, string, error)

func (*Manager) Invoke

func (m *Manager) Invoke(ctx context.Context, toolRef string, input map[string]any) (InvocationResult, error)

func (*Manager) Tools

func (m *Manager) Tools(ctx context.Context) ([]Tool, error)

type Tool

type Tool struct {
	Ref         string
	Name        string
	Description string
	InputSchema map[string]any
	Annotations *Annotations
	CustomID    string
	Source      ToolSource
}

type ToolFrame

type ToolFrame struct {
	FrameID int
	URL     string
}

type ToolSource

type ToolSource struct {
	WindowID  int
	TabID     int
	TargetID  string
	PageTitle string
	PageURL   string
	Frame     *ToolFrame
}

type UpstreamManager

type UpstreamManager interface {
	Current() string
}

Jump to

Keyboard shortcuts

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