get_container_logs
Retrieve container logs from Portainer by environment and container ID, with optional tail limit and timestamps.
Instructions
Get logs from a container
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": {
"environmentId": "<environmentId>",
"containerId": "<containerId>"
},
"name": "get_container_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tail | No | Number of lines from the end (default: 100) | |
| timestamps | No | Include timestamps | |
| containerId | Yes | Container ID or name | |
| environmentId | Yes | Portainer environment ID |