Overview
Tools enable agents to interact with their environment, perform actions, and access external resources. PiCrust comes with a comprehensive set of built-in tools.Built-in Tools
File System Tools
Read
Read contents of files
Write
Create or modify files
Glob
Search files with patterns
Grep
Search file contents
System Tools
Bash
Execute shell commands
Environment
Access environment variables
How Tools Work
When an agent receives a task, it:- Analyzes the request to understand what needs to be done
- Selects the appropriate tool(s) from its available toolset
- Executes the tool with the necessary parameters
- Processes the tool output
- Responds to the user with results

Creating Custom Tools
Build your own tools by implementing theTool trait:
Tool Security
Best Practices
Principle of Least Privilege
Principle of Least Privilege
Only enable tools that are absolutely necessary for the agent’s tasks:
Validate Tool Parameters
Validate Tool Parameters
Add validation in custom tools:
Audit Tool Usage
Audit Tool Usage
Log all tool executions for audit trails:
Tool Examples
Example: File Analysis
Example: Code Execution
Next Steps
MCP Tools
Extend tools with MCP servers
API Reference
View tool API docs