Skip to main content
Glama

deploy_modal_app

Destructive

Deploy a Modal app to publish persistent, shareable live endpoints; use it when you need app URLs that remain available for sharing or integration.

Instructions

Deploy a Modal app (`modal deploy`). Deployed endpoints persist after this returns,
so any URLs in the result are live, shareable links.

Args:
    absolute_path_to_app: Absolute path to the app file. Its directory must use `uv`
        and have `modal` installed in its virtualenv.
    env: Modal environment to deploy into.
    name: Deployment name (`--name`).
    tag: Version tag (`--tag`).
    strategy: Rollout strategy — "rolling" or "recreate".
    stream_logs: Stream the app's logs after deploying.
    profile: Modal profile for this call only. Defaults to the active profile.

Returns: {message, urls (live endpoints), stdout, stderr}.

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": {
      "absolute_path_to_app": "<absolute_path_to_app>"
    },
    "name": "deploy_modal_app"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNo
tagNo
nameNo
profileNo
strategyNo
stream_logsNo
absolute_path_to_appYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.1
    • addedInput schema / properties / profile
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Profile"
      +}
  2. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, openWorldHint=true, idempotentHint=false and readOnlyHint=false, so the safety profile is covered. The description adds genuinely new behavioral context: deployed endpoints persist after return and result URLs are live/shareable, the `profile` applies to this call only, and `stream_logs` continues after deploying. It does not explain what a redeploy does to an existing deployment or how rollback works, which matters for a destructive, non-idempotent tool.

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?

Well structured and front-loaded: the first sentence establishes purpose and outcome, then a terse Args block, then Returns. Every arg line earns its place given zero schema coverage. The Returns line slightly duplicates the existing output schema, which is the only real waste.

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?

For a seven-parameter, destructive, open-world deploy tool the description covers purpose, prerequisites, per-parameter meaning, and post-call state. Since an output schema exists, the brief Returns line is acceptable rather than required. What is missing is the mutation's blast radius — effect on an already-deployed app and how 'rolling' vs 'recreate' affects live traffic.

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%, so the description carries the full burden and does so: every one of the seven parameters is explained, including the `uv`/virtualenv requirement for `absolute_path_to_app` and the `--name`/`--tag` CLI mappings. Critically, it supplies the allowed values for `strategy` ('rolling' or 'recreate'), which the schema does not encode as an enum, and clarifies that `profile` is scoped to this call only.

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

Purpose4/5

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

The description gives a specific verb and resource ('Deploy a Modal app') and equates it to the CLI command `modal deploy`, plus states the lasting effect ('Deployed endpoints persist after this returns'). It does not explicitly contrast itself with the close sibling run_modal_app, so an agent must infer the deploy-vs-run split from the persistence sentence.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the persistence note suggests this is for long-lived apps while run_modal_app would be the ephemeral path, but no alternative is named and no when-not-to-use condition is given. The environmental prerequisite (directory must use `uv` with `modal` in its virtualenv) is a useful selection constraint but is framed as an arg note, not guidance.

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