Skip to main content

What are Tools?

Tools in Slide are the capabilities that agents can use to interact with the world. They bridge the gap between an agent’s decision-making and actual actions. The Lye package provides a comprehensive set of pre-built tools, and you can easily create custom ones. 💻 Code Examples

Basic Tools

Get started with tools

File Tools

Read and write files

Image Tools

Analyze images

Audio Tools

Transcribe and synthesize

Built-in Tools

Slide comes with a rich set of tools organized by category:

Tool Structure

Every tool in Slide follows the OpenAI function calling format:

Creating custom tools

Simple function tool

The easiest way to create a tool:

Advanced tool example

For more complex tools with external dependencies:

Tool patterns

1. Validation Pattern

Always validate inputs:

2. Resource Management Pattern

Properly manage external resources:

3. Error Handling Pattern

Provide meaningful error messages:

4. Rate Limiting

Implement rate limiting for external services:

Tool Best Practices

Write clear, concise descriptions that help agents understand when to use the tool:
Document all parameters thoroughly:
Make tools idempotent when possible:
Always return strings (JSON) from tool implementations:

Testing tools

Always test your custom tools:

Tool Composition

Combine multiple tools for complex operations:

Next steps

Lye Package

Explore all available tools

MCP Integration

Use tools from MCP servers

Tool Examples

See practical tool examples

API Reference

Detailed tool API docs