| Crates.io | mixtape-tools |
| lib.rs | mixtape-tools |
| version | 0.2.1 |
| created_at | 2026-01-05 04:52:19.688308+00 |
| updated_at | 2026-01-06 06:53:48.882411+00 |
| description | Ready-to-use tool implementations for the mixtape agent framework |
| homepage | |
| repository | https://github.com/adlio/mixtape |
| max_upload_size | |
| id | 2023101 |
| size | 720,223 |
Ready-to-use tools for mixtape agents. Seventeen tools across five categories: filesystem, process management, search, code editing, and web fetching.
use mixtape_core::{Agent, ClaudeSonnet4_5};
use mixtape_tools::filesystem::*;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let agent = Agent::builder()
.bedrock(ClaudeSonnet4_5)
.add_tool(ReadFileTool::new())
.add_tool(ListDirectoryTool::new())
.build()
.await?;
let response = agent.run("What files are in this directory?").await?;
println!("{}", response);
Ok(())
}
For granular permission control, use tool grouping functions:
use mixtape_tools::{read_only_filesystem_tools, all_filesystem_tools, all_process_tools};
// Read-only filesystem agent
let agent = Agent::builder()
.bedrock(ClaudeSonnet4_5)
.add_tools(read_only_filesystem_tools())
.build()
.await?;
// Full filesystem access
let agent = Agent::builder()
.bedrock(ClaudeSonnet4_5)
.add_tools(all_filesystem_tools())
.add_tools(all_process_tools())
.build()
.await?;
| Function | Count | Description |
|---|---|---|
read_only_filesystem_tools() |
4 | Safe read operations - read files, list directories, get file info |
mutative_filesystem_tools() |
3 | Destructive operations - write, create, move files |
all_filesystem_tools() |
7 | All filesystem tools |
all_process_tools() |
7 | All process management tools |
All filesystem tools validate paths against a configurable base directory.
| Tool | Description |
|---|---|
read_file |
Read contents with optional line range |
read_multiple_files |
Read several files concurrently |
write_file |
Write or append, creating parent directories |
list_directory |
List contents recursively to a given depth |
create_directory |
Create directories with parents |
move_file |
Move or rename files and directories |
file_info |
Get size, MIME type, timestamps |
| Tool | Description |
|---|---|
list_processes |
List running processes with CPU and memory |
kill_process |
Terminate by PID (SIGTERM) |
start_process |
Start with captured output |
interact_with_process |
Send input, read responses |
read_process_output |
Read accumulated output |
force_terminate |
Kill with SIGKILL |
list_sessions |
List active process sessions |
| Tool | Description |
|---|---|
search |
Search file contents (regex) or filenames (glob), with context lines and .gitignore support |
| Tool | Description |
|---|---|
edit_block |
Replace text blocks with exact or fuzzy matching |
| Tool | Description |
|---|---|
fetch |
Fetch URLs, convert HTML to markdown |
Filesystem tools operate within a configurable base directory. Paths are canonicalized before validation. Attempts to escape with ../ fail with a clear error.
use std::path::PathBuf;
use mixtape_tools::filesystem::*;
// Restrict operations to /safe/directory
let read_tool = ReadFileTool::with_base_path(PathBuf::from("/safe/directory"));
let write_tool = WriteFileTool::with_base_path(PathBuf::from("/safe/directory"));
Process tools operate at the system level without sandboxing. Deploy with appropriate system controls.
Tools use snake_case names when called by the model (read_file, list_processes) but are exported as PascalCase structs in Rust (ReadFileTool, ListProcessesTool).
For convenience when implementing custom tools:
use mixtape_tools::prelude::*;
// Imports: Tool, ToolResult, ToolError, JsonSchema, Deserialize, Serialize