package ai import "context" // ToolResult holds the output of a tool execution. type ToolResult struct { Content string `json:"content"` Error string `json:"error,omitempty"` } // ToolHandler is the function signature for executing a tool. type ToolHandler func(ctx context.Context, params map[string]any) (*ToolResult, error) // ToolDefinition describes a registered tool. type ToolDefinition struct { Slug string Name string Description string ParameterSchema map[string]any Handler ToolHandler } // ToolRegistry is the interface for registering AI tools. // Plugins use this to register their custom tools. // The CMS provides the concrete implementation. type ToolRegistry interface { Register(tool *ToolDefinition) }