Help us shape the future of Go! Take the 2026 Go Developer Survey

mcp

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package mcp provides a thread-safe registry for discovered MCP tools.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ToolEntry

type ToolEntry struct {
	ServerID    string `json:"server_id"`
	ToolName    string `json:"tool_name"`
	Description string `json:"description,omitempty"`
	InputSchema any    `json:"input_schema,omitempty"`
}

ToolEntry describes a tool discovered from an MCP server.

type ToolRegistry

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

ToolRegistry provides thread-safe storage for discovered MCP tools.

func NewToolRegistry

func NewToolRegistry() *ToolRegistry

NewToolRegistry creates a new ToolRegistry.

func (*ToolRegistry) AllTools

func (r *ToolRegistry) AllTools() []ToolEntry

AllTools returns all registered tools.

func (*ToolRegistry) RegisterTools

func (r *ToolRegistry) RegisterTools(serverID string, tools []ToolEntry)

RegisterTools adds a batch of tools from an MCP server.

func (*ToolRegistry) Reset

func (r *ToolRegistry) Reset()

Reset clears all tools from the registry.

Jump to

Keyboard shortcuts

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