tail_container_logs
Fetch the last N lines of logs from remote Docker containers on one or multiple hosts concurrently, returning output per host to speed up troubleshooting.
Instructions
Fetch the last N lines of logs from a remote Docker container on a single host ('host') or multiple hosts concurrently ('hosts'). If using 'hosts', returns a JSON map mapping hostnames to their success status and container log output. Prefer 'hosts' to query container logs across multiple machines simultaneously.
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": "<container>"
},
"name": "tail_container_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | The target hostname or IP address | |
| hosts | No | A list of hostname targets to query concurrently | |
| lines | No | Number of lines to read from the end (default: 100) | |
| container | Yes | The Docker container name or ID | |
| timestamps | No | If true, includes timestamps in output (default: false) |