gateway

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

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