chip

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "0.0.20-SNAPSHOT"

Functions

func GetCallToolRequest

func GetCallToolRequest(ctx context.Context) (*mcp.CallToolRequest, error)

func GetSessionId

func GetSessionId(toolRequest *mcp.CallToolRequest) string

func RegisterTool added in v0.0.19

func RegisterTool[In, Out any](server *Server, tool *Tool[In, Out], client *http.Client, toolConfig *ToolConfig)

func SetCallToolRequest added in v0.0.19

func SetCallToolRequest(ctx context.Context, toolRequest *mcp.CallToolRequest) context.Context

func SetToolConfig added in v0.0.19

func SetToolConfig(ctx context.Context, toolConfig *ToolConfig) context.Context

Types

type CollibraClient

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

func NewCollibraClient

func NewCollibraClient(transport http.RoundTripper) *CollibraClient

func (*CollibraClient) RoundTrip

func (c *CollibraClient) RoundTrip(request *http.Request) (*http.Response, error)

type Server added in v0.0.19

type Server struct {
	mcp.Server
	// contains filtered or unexported fields
}

func NewServer added in v0.0.19

func NewServer(opts ...ServerOption) *Server

type ServerOption added in v0.0.19

type ServerOption func(*Server)

func WithToolMiddleware added in v0.0.19

func WithToolMiddleware(middleware ToolMiddleware) ServerOption

type Tool added in v0.0.19

type Tool[In, Out any] struct {
	Tool        *mcp.Tool
	ToolHandler ToolHandler[In, Out]
}

type ToolConfig

type ToolConfig struct {
	CollibraUrl   string
	EnabledTools  []string
	DisabledTools []string
}

func GetToolConfig

func GetToolConfig(ctx context.Context) (*ToolConfig, error)

func (*ToolConfig) IsToolEnabled

func (tc *ToolConfig) IsToolEnabled(toolName string) bool

type ToolHandler added in v0.0.19

type ToolHandler[In, Out any] func(ctx context.Context, client *http.Client, input In) (Out, error)

type ToolMiddleware added in v0.0.19

type ToolMiddleware interface {
	Handle(next ToolMiddlewareHandler) ToolMiddlewareHandler
}

type ToolMiddlewareFunc added in v0.0.19

type ToolMiddlewareFunc func(next ToolMiddlewareHandler) ToolMiddlewareHandler

func (ToolMiddlewareFunc) Handle added in v0.0.19

type ToolMiddlewareHandler added in v0.0.19

type ToolMiddlewareHandler func(ctx context.Context, input any) (any, error)

Jump to

Keyboard shortcuts

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