Run a command in a Compose service
compose_execRun a command in a running service of a Compose project and capture its exit code and output. Use it to inspect or change containers; confirm writes first.
Instructions
Run a command in a running service of a Compose project, returning its exit code and output. The command is a list; for a shell line, ["sh", "-c", "…"]. Can change the service: confirm with the person first unless it only reads.
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": {
"folder": "<folder>",
"service": "<service>",
"command": "<command>"
},
"name": "compose_exec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Its compose file, when it isn't the folder's compose.yaml | |
| folder | Yes | The Compose project's folder (absolute path), where its compose.yaml is | |
| command | Yes | ||
| service | Yes | ||
| timeoutSeconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output | Yes | ||
| exitCode | Yes | ||
| truncated | Yes |