Run command
run_command
RunCommandTool — execute shell commands with timeout and output truncation.
Registered as run_command via the axm.tools entry point.
RunCommandTool
Execute shell commands with timeout and output truncation.
Runs commands via subprocess.run with configurable timeout,
output size caps, and a blocked-command safety list.
Registered as run_command via axm.tools entry point.
Source code in packages/axm-edit/src/axm_edit/tools/run_command.py
name
property
Tool name used for MCP registration.
execute(*, command=None, path='.', cwd=None, timeout=_DEFAULT_TIMEOUT, **kwargs)
Execute a shell command.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
command
|
str | None
|
Shell command string (required). |
None
|
path
|
str
|
Project root directory (default "."). |
'.'
|
cwd
|
str | None
|
Working directory, relative to root (optional). |
None
|
timeout
|
int
|
Timeout in seconds (default 30). |
_DEFAULT_TIMEOUT
|
Returns:
| Type | Description |
|---|---|
ToolResult
|
ToolResult with stdout, stderr, exit_code, and timed_out. |