chip

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: Apache-2.0 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

Index

Constants

This section is empty.

Variables

View Source
var Version = "0.0.24-SNAPSHOT"

Functions

func GetCallToolRequest

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

func GetCollibraHost added in v0.0.22

func GetCollibraHost(ctx context.Context) (string, bool)

func GetSessionId

func GetSessionId(ctx context.Context) string

func RegisterTool added in v0.0.19

func RegisterTool[In, Out any](s *Server, tool *Tool[In, Out])

func SetCallToolRequest added in v0.0.19

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

func SetCollibraHost added in v0.0.22

func SetCollibraHost(ctx context.Context, collibraHost string) context.Context

Types

type CallToolFunc added in v0.0.21

type CallToolFunc func(context.Context, *mcp.CallToolRequest) (*mcp.CallToolResult, error)

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

func (*Server) GetToolMetadata added in v0.0.24

func (s *Server) GetToolMetadata(toolName string) *ToolMetadata

GetToolMetadata returns the metadata for a given tool

type ServerOption added in v0.0.19

type ServerOption func(*Server)

func WithToolMiddleware added in v0.0.19

func WithToolMiddleware(middleware ToolMiddleware) ServerOption

type ServerToolConfig added in v0.0.24

type ServerToolConfig struct {
	EnabledTools  []string
	DisabledTools []string
}

ServerToolConfig is used to configure which tools are enabled/disabled at the server level

func (*ServerToolConfig) IsToolEnabled added in v0.0.24

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

type Tool added in v0.0.19

type Tool[In, Out any] struct {
	Name        string
	Description string
	Handler     ToolHandlerFunc[In, Out]
	Permissions []string
}

type ToolHandlerFunc added in v0.0.21

type ToolHandlerFunc[In, Out any] func(ctx context.Context, input In) (Out, error)

type ToolMetadata added in v0.0.24

type ToolMetadata struct {
	Name        string
	Permissions []string
}

ToolMetadata stores metadata about a registered tool

type ToolMiddleware added in v0.0.19

type ToolMiddleware interface {
	ToolHandle(ctx context.Context, toolRequest *mcp.CallToolRequest, next CallToolFunc) (*mcp.CallToolResult, error)
}

type ToolMiddlewareFunc added in v0.0.19

type ToolMiddlewareFunc func(ctx context.Context, toolRequest *mcp.CallToolRequest, next CallToolFunc) (*mcp.CallToolResult, error)

func (ToolMiddlewareFunc) ToolHandle added in v0.0.21

func (f ToolMiddlewareFunc) ToolHandle(ctx context.Context, toolRequest *mcp.CallToolRequest, next CallToolFunc) (*mcp.CallToolResult, error)

Jump to

Keyboard shortcuts

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