Overview
Lye tools follow a specific format that makes them compatible with Tyler agents and LLM function calling. Each tool consists of a definition (for the LLM) and an implementation (the actual function).Tool Structure
Each Lye tool is a dictionary with the following structure:Tool Implementation
Tool functions follow specific patterns:Basic Tool
Tool with Files
Tools that return files use a tuple format:Parameter Types
Basic Types
Enums
Arrays
Optional Parameters
Return Formats
Simple string return
Structured return with files
Error Handling
Tool Naming Conventions
Lye follows consistent naming patterns:- Format:
category-action_target
- Examples:
web-fetch_page
files-read_file
image-generate_image
slack-send_message
Using tools with agents
Direct Usage
Tool Selection
Tool Execution Flow
- User Request: User asks agent to perform a task
- Tool Selection: Agent selects appropriate tool based on description
- Parameter Extraction: Agent extracts parameters from context
- Validation: Parameters are validated against schema
- Execution: Tool function is called with parameters
- Result Processing: Result is returned to agent
- Response: Agent incorporates result into response