Documentation
¶
Index ¶
- Constants
- Variables
- func CopyHeader(mcpRequest *mcp.CallToolRequest, httpRequest *http.Request, header string)
- func GetCallToolRequest(ctx context.Context) (*mcp.CallToolRequest, error)
- func GetCollibraUrl(ctx context.Context) (string, error)
- func GetHeaderValue(mcpRequest *mcp.CallToolRequest, header string) string
- func GetSessionId(mcpRequest *mcp.CallToolRequest) string
- func NewMcpServer() *mcp.Server
- func RegisterMcpTool[In, Out any](server *mcp.Server, tool *CollibraTool[In, Out], client *http.Client, ...)
- type CollibraClient
- type CollibraTool
- type CollibraToolHandler
- type ToolConfig
Constants ¶
View Source
const ( CallToolRequestKey contextKey = "mcpRequest" ToolConfigKey contextKey = "toolConfig" )
Variables ¶
View Source
var Version = "v1.0.0"
Functions ¶
func CopyHeader ¶
func CopyHeader(mcpRequest *mcp.CallToolRequest, httpRequest *http.Request, header string)
func GetCallToolRequest ¶
func GetCallToolRequest(ctx context.Context) (*mcp.CallToolRequest, error)
func GetHeaderValue ¶
func GetHeaderValue(mcpRequest *mcp.CallToolRequest, header string) string
func GetSessionId ¶
func GetSessionId(mcpRequest *mcp.CallToolRequest) string
func NewMcpServer ¶
func RegisterMcpTool ¶
func RegisterMcpTool[In, Out any](server *mcp.Server, tool *CollibraTool[In, Out], client *http.Client, toolConfig *ToolConfig)
Types ¶
type CollibraClient ¶
type CollibraClient struct {
// contains filtered or unexported fields
}
func NewCollibraClient ¶
func NewCollibraClient(transport http.RoundTripper) *CollibraClient
type CollibraTool ¶
type CollibraTool[In, Out any] struct { Tool *mcp.Tool ToolHandler CollibraToolHandler[In, Out] }
type CollibraToolHandler ¶
type ToolConfig ¶
func GetToolConfig ¶
func GetToolConfig(ctx context.Context) (*ToolConfig, error)
func (*ToolConfig) IsToolEnabled ¶
func (tc *ToolConfig) IsToolEnabled(toolName string) bool
Click to show internal directories.
Click to hide internal directories.