Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
container_idYes
timeout_secondsNo
sinceNo
untilNo
tailNo
searchNo
sourceNo
followNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses that follow=True causes live-streaming until container stop or timeout, and that the response includes a 'truncated' flag. Missing auth/rate limits, but acceptable for a log tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with an Args section and a Returns section. It is concise, front-loaded with the main purpose, and each sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 8 parameters, no annotations, and an existing output schema, the description covers functionality well. It explains all parameters and the return structure. Minor omissions like error handling or pagination prevent a perfect score.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description provides extensive explanations for all 8 parameters, including formats for since/until, example for container_id, and defaults. This fully compensates for the schema gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Fetch or stream logs for a specific Modal container', identifies the resource as container logs, and includes an example container ID format. It distinguishes from sibling tools like 'get_modal_app_logs' and 'search_modal_logs' by specifying 'container'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains that container_id comes from 'list_modal_containers' and details each parameter's purpose and defaults. It does not explicitly state when not to use it or mention alternative tools, but the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/george-bobby/mcp-modal'

If you have feedback or need assistance with the MCP directory API, please join our Discord server