Documentation
¶
Index ¶
- Constants
- Variables
- func GetCallToolRequest(ctx context.Context) (*mcp.CallToolRequest, bool)
- func GetCollibraHost(ctx context.Context) (string, bool)
- func GetInitParams(ctx context.Context) (*mcp.InitializeParams, bool)
- func GetSessionId(ctx context.Context) string
- func KnownCapabilityNames() []string
- func Ptr[T any](v T) *T
- 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
- func SetInitParams(ctx context.Context, params *mcp.InitializeParams) context.Context
- type CallToolFunc
- type CollibraClient
- type Server
- type ServerOption
- type ServerToolConfig
- type Tool
- type ToolHandlerFunc
- type ToolMetadata
- type ToolMiddleware
- type ToolMiddlewareFunc
Constants ¶
const DataQualityCapabilityName = "data-quality"
DataQualityCapabilityName is the name of the data quality capability as it is spelled outside Go: the --data-quality flag, the COLLIBRA_MCP_DATA_QUALITY env var, the mcp.data-quality YAML field, and a skill's `requires:` frontmatter. It is deliberately NOT an experimental feature name — see ServerToolConfig.DataQuality.
Variables ¶
var Version = "0.0.0-SNAPSHOT"
Functions ¶
func GetCallToolRequest ¶
func GetCallToolRequest(ctx context.Context) (*mcp.CallToolRequest, bool)
func GetInitParams ¶ added in v0.0.35
func GetInitParams(ctx context.Context) (*mcp.InitializeParams, bool)
func GetSessionId ¶
func KnownCapabilityNames ¶ added in v0.0.61
func KnownCapabilityNames() []string
KnownCapabilityNames lists the capability names CapabilityEnabled resolves, in sorted order, for help and error text.
func RegisterTool ¶ added in v0.0.19
func SetCallToolRequest ¶ added in v0.0.19
func SetCollibraHost ¶ added in v0.0.22
func SetInitParams ¶ added in v0.0.35
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
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 WithInstructions ¶ added in v0.0.35
func WithInstructions(snippet string) ServerOption
WithInstructions appends a snippet to the server's initialize instructions. Use this so optional features (e.g. experimental skills) can contribute their own bootstrap text only when enabled.
func WithReplacementInstructions ¶ added in v0.0.35
func WithReplacementInstructions(text string) ServerOption
WithReplacementInstructions replaces the server's default initialize instructions with the given text, discarding any previously appended parts (including the embedded default). Use this when an optional feature owns the entire bootstrap surface — e.g. the experimental skills feature, which routes the model through skill discovery instead of carrying workflow recipes in instructions.
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
// EnableDebugTools, when true, registers debug tools that are otherwise hidden.
EnableDebugTools bool
// DataQuality, when true, registers the data quality tools, which are
// otherwise not registered at all. It is a capability flag, not an
// experimental feature: the tools it gates are generally available, they
// write to (and two of them irreversibly delete from) Collibra, so an
// operator opts into the capability as a whole. Experimental is the other
// axis — a list of opt-in feature names with no stability promise.
DataQuality bool
Experimental []string
// SkillsDir is the optional path to an external skills directory whose
// contents are merged on top of the embedded catalog. Empty means the
// embedded catalog alone is served. Only consulted when the "skills"
// experimental feature is enabled.
SkillsDir string
}
ServerToolConfig is used to configure which tools are enabled/disabled at the server level
func (*ServerToolConfig) CapabilityEnabled ¶ added in v0.0.61
func (tc *ServerToolConfig) CapabilityEnabled(name string) (bool, error)
CapabilityEnabled resolves a capability name — the spelling used outside Go, e.g. in a skill's `requires:` frontmatter — against this config. It lives here, next to the fields it reads, so adding a capability flag is one edit: the bool field, its constant, and its entry in capabilityFields. An unrecognized name is an error, not false: a consumer that silently ignored it would apply the opposite of the gate its author asked for.
func (*ServerToolConfig) IsExperimentalEnabled ¶ added in v0.0.35
func (tc *ServerToolConfig) IsExperimentalEnabled(featureName string) bool
IsExperimentalEnabled reports whether the given experimental feature name was opted into via --experimental, COLLIBRA_MCP_EXPERIMENTAL, or mcp.experimental in the YAML config.
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 Title string Description string Handler ToolHandlerFunc[In, Out] Permissions []string TypeSchemas map[reflect.Type]*jsonschema.Schema Annotations *mcp.ToolAnnotations }
type ToolHandlerFunc ¶ added in v0.0.21
type ToolMetadata ¶ added in v0.0.24
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)