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
| Name | Required | Description | Default |
|---|---|---|---|
| absolute_path_to_app | Yes | ||
| function_name | No | ||
| env | No | ||
| detach | No | ||
| timeout_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |