Documentation
¶
Overview ¶
Package tooldef provides JSON Schema tool definitions for AI agent frameworks.
These definitions are compatible with OpenAI function-calling, Anthropic tool_use, Google Gemini function declarations, and any framework that accepts JSON Schema (LangChain, Vercel AI SDK, Semantic Kernel, etc.).
Usage:
tools := tooldef.AllTools() // Register with your agent framework's tool system
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Schema ¶
type Schema struct {
Type string `json:"type"`
Description string `json:"description,omitempty"`
Properties map[string]Schema `json:"properties,omitempty"`
Required []string `json:"required,omitempty"`
Enum []string `json:"enum,omitempty"`
Items *Schema `json:"items,omitempty"`
}
Schema is a minimal JSON Schema representation.
type ToolDef ¶
type ToolDef struct {
Name string `json:"name"`
Description string `json:"description"`
Parameters Schema `json:"parameters"`
}
ToolDef describes a callable tool with its JSON Schema parameters.
func DesignVoice ¶
func DesignVoice() ToolDef
DesignVoice returns the tool definition for custom voice creation.
func GenerateImage ¶
func GenerateImage() ToolDef
GenerateImage returns the tool definition for image generation.
func GenerateVideo ¶
func GenerateVideo() ToolDef
GenerateVideo returns the tool definition for video generation.
func TextToSpeech ¶
func TextToSpeech() ToolDef
TextToSpeech returns the tool definition for text-to-speech synthesis.
func TranscribeAudio ¶
func TranscribeAudio() ToolDef
TranscribeAudio returns the tool definition for audio transcription.