Documentation
¶
Index ¶
- Variables
- func GetCallToolRequest(ctx context.Context) (*mcp.CallToolRequest, bool)
- func GetCollibraHost(ctx context.Context) (string, bool)
- func GetSessionId(ctx context.Context) string
- func RegisterTool[In, Out any](s *Server, tool *Tool[In, Out])
- func SetCallToolRequest(ctx context.Context, toolRequest *mcp.CallToolRequest) context.Context
- func SetCollibraHost(ctx context.Context, collibraHost string) context.Context
- type CallToolFunc
- type CollibraClient
- type Server
- type ServerOption
- type Tool
- type ToolConfig
- type ToolHandlerFunc
- type ToolMiddleware
- type ToolMiddlewareFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = "0.0.23-SNAPSHOT"
Functions ¶
func GetCallToolRequest ¶
func GetCallToolRequest(ctx context.Context) (*mcp.CallToolRequest, bool)
func GetSessionId ¶
func RegisterTool ¶ added in v0.0.19
func SetCallToolRequest ¶ added in v0.0.19
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
type Server ¶ added in v0.0.19
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 { Name string Description string Handler ToolHandlerFunc[In, Out] }
type ToolConfig ¶
func (*ToolConfig) IsToolEnabled ¶
func (tc *ToolConfig) IsToolEnabled(toolName string) bool
type ToolHandlerFunc ¶ added in v0.0.21
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)
Click to show internal directories.
Click to hide internal directories.