get_modal_container_logs
Fetch or stream logs from a Modal container by ID, with optional filters for time range, source, search, and live tailing.
Instructions
Fetch or stream logs for a specific Modal container (`modal container logs`).
Args:
container_id: Container ID (e.g. "ta-123456"), from list_modal_containers.
timeout_seconds: Max seconds to collect logs before returning. Defaults to 30.
since: Start of time range — ISO 8601 or relative like "2h", "30m", "1d".
until: End of time range (same formats as `since`).
tail: Show only the last N log entries.
search: Only include log lines matching this search text.
source: Filter by source: "stdout", "stderr", or "system".
follow: If True, live-stream logs until the container stops or the timeout hits.
Returns:
A dictionary with the collected logs. `truncated` is True when the stream was cut
off at the timeout.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| container_id | Yes | ||
| timeout_seconds | No | ||
| since | No | ||
| until | No | ||
| tail | No | ||
| search | No | ||
| source | No | ||
| follow | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |