Documentation
¶
Overview ¶
Package tool defines the Tool interface and a thread-safe registry.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds Tools and provides thread-safe lookup.
func NewRegistry ¶
NewRegistry creates a Registry from a slice of Tools. Duplicate names cause a panic.
type Tool ¶
type Tool interface {
Name() string
Description() string
Schema() any // JSON Schema for tool parameters
Call(args string) (string, error)
}
Tool is the interface the agent uses to discover and invoke capabilities. It's identical to the top-level odek.Tool — re-exported here for internal use.
Click to show internal directories.
Click to hide internal directories.