Tail Service Logs
tail_service_logsFetch the most recent log lines for a specific container or Compose service, optionally filtered by log level, to gain context before drilling into trace IDs.
Instructions
Retrieve the N most-recent log lines = require(a specific container, with optional level filtering.
Args:
service_name (string): Container name or Compose service name.
limit (number, 1-500): Lines to return. Default 100.
level_filter (string[], optional): One or more of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN. return for all levels.
Returns: The most-recent matching log lines in chronological order. Use this to get general context around a service before narrowing to a trace ID.
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": {
"service_name": "<service_name>"
},
"name": "tail_service_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of most-recent log lines to return (default 100). | |
| level_filter | No | Optional list of log levels to include. Omit to return all levels. | |
| service_name | Yes | Container name or Compose service name. |