Skip to main content
Glama

run_modal_app

Run a Modal function or entrypoint to test it on Modal compute with live log streaming.

Instructions

Run a Modal function or local entrypoint (`modal run`). Unlike deploy, this executes
the app once and streams its logs; use it to test a function on Modal compute.

Args:
    absolute_path_to_app: Absolute path to the Modal app file. Its directory must
        use `uv` and have `modal` installed in its virtualenv.
    function_name: Optional function / entrypoint name, e.g. "main". When omitted,
        Modal runs the single entrypoint/function if the module has exactly one.
    env: Optional Modal environment to target.
    detach: If True, keep the app running on Modal even if this process disconnects
        (`--detach`). Useful for long jobs you don't want cut off at the timeout.
    timeout_seconds: Max seconds to collect output before returning. Defaults to 120.

Returns:
    A dictionary with collected output. `truncated` is True when the run was still
    going at the timeout. `urls` lists any links found in the output.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
absolute_path_to_appYes
function_nameNo
envNo
detachNo
timeout_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description fully discloses behavior: single execution, log streaming, detach persistence, timeout with truncated output, and return format. It covers key traits beyond schema defaults.

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

Conciseness4/5

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

The description is well-structured with a clear opening line, sibling distinction, and bulleted Args/Returns. It is slightly lengthy but every sentence adds value. Front-loaded with the most critical information.

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

Completeness5/5

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

Given 5 parameters, no annotations, and an output schema, the description covers purpose, usage, behavioral traits, parameter details, and return values. It includes important context like 'uv' requirement and detach behavior, making it complete for an agent.

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 coverage is 0%, but the description thoroughly explains each parameter: absolute_path_to_app (path and environment requirements), function_name (optionality with default logic), env (optional environment), detach (behavior and default), timeout_seconds (purpose and default). This adds significant meaning beyond the schema.

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 the tool runs a Modal function or local entrypoint, and explicitly distinguishes it from deploy by noting it executes once and streams logs. It uses specific verb+resource and differentiates from sibling tools.

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 explicitly says to use this tool for testing on Modal compute and contrasts it with deploy. While it gives clear context, it could be stronger by explicitly stating when not to use or mentioning alternatives, but it is sufficient.

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