Skip to main content
Glama

manage_modal_app

Destructive

Stop a live Modal app or roll back to a previous deployment by app name or ID, specifying the target environment or profile.

Instructions

Change a deployed app's state. Both actions affect live traffic.

Args:
    action: "stop" — shut the app down, ending web endpoints (`modal app stop`).
        "rollback" — restore a previous deployment (`modal app rollback`).
    app_identifier: App name ("my-app") or ID ("ap-...").
    version: Rollback target; omit for the immediately preceding version. List valid
        versions with list_modal_resources(resource="app_history", name=...).
    env: Modal environment to target.
    profile: Modal profile for this call only. Defaults to the active profile.

Returns: {message, stdout, stderr} or {error}.

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": {
      "action": "<action>",
      "app_identifier": "<app_identifier>"
    },
    "name": "manage_modal_app"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNo
actionYes
profileNo
versionNo
app_identifierYes

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. Addedv0.2.2

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and non-idempotency, so the safety profile is carried by structured data. The description adds real value with 'Both actions affect live traffic' and the response shape, but it never says whether a stop is recoverable or how in-flight requests are handled.

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?

Two-sentence summary up front with the live-traffic warning before the argument list, then a scannable per-parameter block and a one-line return. No filler sentences.

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 destructive five-parameter mutation tool with annotations and an output schema already in place, this covers purpose, per-action meaning, defaults, and how to discover versions. Missing only reversibility and permission expectations, which an agent would still want before calling.

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

Parameters4/5

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

Schema coverage is 0% and the action parameter has no enum, so the description must do all the work, and it does: it enumerates the two valid action values, gives format examples for app_identifier ('my-app' / 'ap-...'), and explains the version default. The env entry ('Modal environment to target') is the one parameter left thin.

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?

States a specific verb and resource ('Change a deployed app's state') and enumerates the two supported actions with their CLI equivalents, which cleanly separates it from siblings like deploy_modal_app or run_modal_app.

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?

Clearly frames when each action applies ('stop' ends web endpoints, 'rollback' restores a prior deployment) and routes the agent to list_modal_resources(resource="app_history") to find valid versions. It stops short of explicit when-not-to-use guidance or prerequisites, so it is strong but not complete.

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