client

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallTool

func CallTool(ctx context.Context, tp Transporter, toolName string, argsAsJson string) (*mcp.CallToolResult, error)

func Close

func Close()

func GetClient

func GetClient(ctx context.Context, tp Transporter) (c client.MCPClient, err error)

func ListAllTools

func ListAllTools(ctx context.Context, s map[string]Transporter) (map[string]map[string]mcp.Tool, error)

func ListTools

func ListTools(ctx context.Context, tp Transporter) ([]mcp.Tool, error)

Types

type Timeouts

type Timeouts struct {
	Init      time.Duration
	List      time.Duration
	Execution time.Duration
}

func (Timeouts) ExecutionContext

func (t Timeouts) ExecutionContext(ctx context.Context) (context.Context, context.CancelFunc)

func (Timeouts) InitContext

func (t Timeouts) InitContext(ctx context.Context) (context.Context, context.CancelFunc)

func (Timeouts) ListContext

func (t Timeouts) ListContext(ctx context.Context) (context.Context, context.CancelFunc)

type Transporter

type Transporter interface {
	GetTransport() (transport.Interface, error)
	GetTimeouts() Timeouts
}

Jump to

Keyboard shortcuts

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