server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package server wires the AskUserQuestion tool into an MCP server.

The tool's schema, validation rules, and canonical answer formatting come from github.com/dreamware-nz/askuserquestion-go so this package stays focused on protocol plumbing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(s *mcp.Server, resolver Resolver)

Register adds the AskUserQuestion tool to an existing MCP server using the canonical SDK tool name. The handler bridges MCP CallTool invocations to the supplied Resolver and emits the canonical answer string back as the tool result.

Types

type Resolver

type Resolver interface {
	Ask(ctx context.Context, req askuserquestion.Request) ([]askuserquestion.Answer, error)
}

Resolver is the abstraction the MCP tool handler calls to actually surface the question to a human. The default implementation is a browser-based picker (internal/browser), but tests and alternative frontends can supply their own.

Jump to

Keyboard shortcuts

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