execute
Run CLI programs such as git, mvn, gradle, docker, or kubectl directly without a shell to prevent command injection and return stdout, stderr, and exit codes.
Instructions
Execute a CLI command. The command is run directly via execFile (not through a shell) to prevent injection. Respects Kiro's trustedCommands and commandDenylist settings.
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>",
"args": "<args>"
},
"name": "execute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for the command. Defaults to the server's cwd. | |
| args | Yes | Arguments to pass to the command. Example: ["clean", "install", "-DskipTests"] | |
| command | Yes | The CLI command to run (e.g. 'mvn', 'git', 'gradle'). | |
| timeout | No | Timeout in milliseconds. Overrides Kiro's terminalCommandTimeout. |