Overview
OneClaw provides three built-in tools that cover common agent needs: system information reporting, workspace file writing, and notifications. Source:/home/daytona/workspace/source/crates/oneclaw-tools/src/
SystemInfoTool
Reports system information such as OS, memory usage, and uptime. Category:systemSource:
/home/daytona/workspace/source/crates/oneclaw-tools/src/system_info.rs:8
Constructor
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
section | String | No | What to report: all, os, memory, uptime (default: all) |
Output Format
Returns formatted system information based on the requested section:os: Operating system and architectureuptime: System uptime in hours and minutesmemory: Memory usage (used/total in MB)all: All of the above
Metadata
section: The section that was requested
Usage
Platform Support
Reads/proc/uptime and /proc/meminfo for uptime and memory information. Falls back to “unknown” or “info not available” on non-Linux systems.
FileWriteTool
Writes content to files within a sandboxed workspace directory. Category:ioSource:
/home/daytona/workspace/source/crates/oneclaw-tools/src/file_write.rs:10
Constructor
workspace: The root directory for file operations (security boundary)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
path | String | Yes | Relative file path within workspace |
content | String | Yes | Content to write to the file |
mode | String | No | Write mode: overwrite (default) or append |
Security
- Path validation: Paths containing
..are rejected - Workspace boundary: Resolved paths must remain within workspace
- Automatic directory creation: Parent directories are created if needed
Metadata
path: The relative path writtenbytes: Number of bytes writtenmode: Write mode used (overwriteorappend)
Usage
Nested Directories
The tool automatically creates parent directories:NotifyTool
Sends notifications via file-based alert log and tracing. Category:notifySource:
/home/daytona/workspace/source/crates/oneclaw-tools/src/notify.rs:13
Constructors
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
message | String | Yes | Notification message |
urgency | String | No | low, normal, high, critical (default: normal) |
recipient | String | No | Who to notify (default: system) |
Behavior
- Tracing log: Emits INFO-level log with urgency and recipient
- Alert log file: Appends timestamped entry to alert log
Alert Log Format
Metadata
urgency: The urgency levelrecipient: The notification recipientlog_path: Path to the alert log file
Usage
Custom Log Path
Tracing Integration
Notifications are also logged viatracing::info! for integration with logging infrastructure:
Registration Example
Register all built-in tools:See Also
- Tool Trait - Implementing custom tools
- ToolRegistry - Tool registration and execution