terminal
Run shell commands and capture output for tasks like listing files, checking paths, or automating CLI operations, with optional working directory and timeout.
Instructions
Execute a shell command and return the output.
Args:
command: The shell command to execute (e.g., "ls -la", "pwd", "echo hello")
working_directory: Optional working directory to run the command in.
If not provided, uses current directory.
timeout: Optional timeout in seconds (default: 30.0)
ctx: MCP context (automatically provided)
Returns:
A string containing the command output, or an error message if execution fails.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"command": "<command>"
},
"name": "terminal"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | ||
| timeout | No | ||
| working_directory | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |