gateway

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 9 Imported by: 1 module, 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 gateway provides MCP gateway tools for tool registration, search, and invocation across federated MCP servers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GatewayTools

type GatewayTools interface {
	ListTools() []Tool
	InvokeTool(ctx context.Context, params InvokeToolParams) (interface{}, error)
	SearchTools(ctx context.Context, query string) ([]ToolSearchResult, error)
	ListServers(ctx context.Context) ([]ServerInfo, error)
}

func NewGatewayTools

func NewGatewayTools(serverReg registry.Registry, toolReg router.ToolRegistry, router router.Router, logger *slog.Logger) GatewayTools

type InvokeToolParams

type InvokeToolParams struct {
	ServerName string                 `json:"server_name"`
	ToolName   string                 `json:"tool_name"`
	Arguments  map[string]interface{} `json:"arguments,omitempty"`
}

type ServerInfo

type ServerInfo struct {
	Name      string `json:"name"`
	Status    string `json:"status"`
	Transport string `json:"transport"`
	ToolCount int    `json:"tool_count"`
}

type Tool

type Tool struct {
	Name        string      `json:"name"`
	Description string      `json:"description"`
	InputSchema interface{} `json:"inputSchema,omitempty"`
}

type ToolSearchResult

type ToolSearchResult struct {
	ToolName    string `json:"tool_name"`
	ServerName  string `json:"server_name"`
	Description string `json:"description"`
}

Jump to

Keyboard shortcuts

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