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.
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 |