registry

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package registry offers a go/mcp registry's operations to a chat model as ordinary chat.Tool values, with no MCP server between them and no MCP SDK linked. Outcomes reach the model as go/mcp's own server renders them, and a failure is a *chat.ToolFailure, so providers mark it as one. See https://gitlab.com/phpboyscout/go/chat/-/wikis/specs/0041-go-mcp-registry-as-chat-tools

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tools

func Tools(ctx context.Context, reg *mcp.Registry, opts ...Option) ([]chat.Tool, error)

Tools returns reg's operations as chat tools: by default go/mcp's compact facade, or with Direct one tool per operation ctx may discover now. Every call is authorized again, against the context the tool loop hands its handler, so the list is a snapshot of names and never of permission.

Types

type Option

type Option func(*config)

Option configures Tools.

func Direct

func Direct() Option

Direct offers one tool per operation the caller may discover, instead of the compact search, inspect and call facade.

Jump to

Keyboard shortcuts

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