Documentation
¶
Overview ¶
Package skill provides interfaces for defining MCP tools and skills. This is a local stub that will be replaced with github.com/plexusone/omniskill/skill when that package becomes available.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parameter ¶
type Parameter struct {
// Type is the JSON Schema type (string, number, boolean, array, object).
Type string
// Description explains the parameter's purpose.
Description string
// Required indicates whether the parameter must be provided.
Required bool
// Default is the default value if not provided.
Default any
// Enum lists allowed values for enum types.
Enum []any
}
Parameter defines a tool parameter.
type Parameters ¶
Parameters is a map of parameter names to their definitions.
type Skill ¶
type Skill interface {
// Name returns the skill identifier.
Name() string
// Description returns a human-readable description.
Description() string
// Init performs any initialization needed by the skill.
Init(ctx context.Context) error
// Close cleans up any resources.
Close() error
// Tools returns all tools provided by this skill.
Tools() []Tool
}
Skill represents a collection of related tools that can be exposed via MCP.
type Tool ¶
type Tool interface {
// Name returns the tool identifier.
Name() string
// Description returns a human-readable description.
Description() string
// Parameters returns the parameter schema for this tool.
Parameters() Parameters
// Execute runs the tool with the given parameters.
Execute(ctx context.Context, params map[string]any) (any, error)
}
Tool represents a single MCP tool.
Click to show internal directories.
Click to hide internal directories.