get_docker_container_logs
Retrieve a Docker container's stdout/stderr log lines read-only via the Docker API, optionally tailing lines and adding timestamps to debug or inspect container output.
Instructions
Returns a container's stdout/stderr log lines. Params: tail (line count) and timestamps. Read-only via the Docker API. Fatal if the daemon is unreachable or the container is unknown. Log content may contain sensitive data.
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": {
"container_id": "<container_id>"
},
"name": "get_docker_container_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tail | No | number of lines to tail (default: 100, max: 10000) | |
| timestamps | No | include timestamps (default: false) | |
| container_id | Yes | container name or ID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| logs | Yes | ||
| errors | No |