NAME
Acme::Claude::Shell::Tools - SDK MCP tool definitions for Acme::Claude::Shell
SYNOPSIS
use Acme::Claude::Shell::Tools qw(shell_tools);
my $tools = shell_tools($session);
DESCRIPTION
Defines the SDK MCP tools that Claude can use to interact with the shell. Each tool returns a Future for async execution.
Tools
execute_command - Run shell commands (with user confirmation)
Executes arbitrary shell commands. The user is prompted to approve, edit, dry-run, or cancel each command before execution. Dangerous commands (rm -rf, sudo, mkfs, etc.) trigger additional warnings.
read_file - Read file contents (safe, no confirmation)
Read file contents directly without shell commands. Supports
linesparameter to read first N lines, andtailparameter to read last N lines.list_directory - List directory contents (safe, no confirmation)
List directory contents with optional glob
patternfiltering,long_formatfor detailed output, andshow_hiddenfor dotfiles.search_files - Search for files by pattern (safe, no confirmation)
Search recursively by filename
pattern(glob) or filecontent(grep). Supportsmax_depthlimit. Results capped at 100 matches.get_system_info - Get system information (safe, no confirmation)
Returns OS, disk, memory, and process information. Use
info_typeto filter: 'all', 'os', 'disk', 'memory', or 'processes'.get_working_directory - Get current working directory (safe)
Returns the current working directory path.
Command Approval
The execute_command tool handles user approval directly (not via hooks) to ensure synchronous confirmation before execution. Users can:
[a] Approve and run the command
[d] Dry-run (preview only, don't execute)
[e] Edit the command before running
[x] Cancel
Dangerous Command Detection
The following patterns trigger additional safety warnings:
rm -rf,rm --recursive,rm --forcesudocommandsmkfs,dd of=, device writeschmod 777,chown -Rkill -9,reboot,shutdown,halt,poweroffFork bombs, remote script piping (curl/wget | sh)
AUTHOR
LNATION, <email at lnation.org>
LICENSE AND COPYRIGHT
This software is Copyright (c) 2026 by LNATION.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)