Skip to main content
Glama

Update app and redeploy

update_app
Destructive

Change an app instance's settings (repo, branch, rootDir, runtime, build/start commands, outputDir, appPort, apiPrefix, env, repoToken) and, by default, redeploy: the pod fetches the latest commit of the branch and runs the build again. Only the fields you send change; the rest stay as stored. Same instance, same address, same /data disk (it persists across rebuilds), so a second build is faster. The build runs inside the pod (the plan is the build machine); a start command is restarted if it exits; linux/amd64 only. env: send full values for the keys you change; a masked value (***abcd) as returned by reads means 'keep the stored one', and a masked value for a key that was never set is refused. Build errors do not stop the previous version serving: call get_app_build to see state and log. Only for instances whose engine is app. With redeploy false the settings are only saved and take effect on the next rebuild.

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": {
      "id": "<id>"
    },
    "name": "update_app"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesId of an instance whose engine is app, as returned by create_instance or list_instances.
envNoEnvironment variables for the app (at most 50; names like [A-Za-z_][A-Za-z0-9_]*). Put secrets here. Values are stored as-is but come back masked (***abcd) on every read; a value sent back in that masked form means 'keep the stored one'.
repoNohttps git URL of the repository to deploy, e.g. https://github.com/owner/project. SSH remotes and URLs with credentials are refused; use repoToken for a private repository.
branchNoBranch to build and deploy. Defaults to main.
appPortNoPort the backend listens on inside the pod, 1024-65535. Defaults to 3000.
rootDirNoDirectory inside the repository where the build runs (a monorepo's app folder). Relative path, no leading / and no ..; omit for the repository root.
runtimeNonode, python, go, static or docker. Omit to let the pod detect it from the repository (node and static output are the proven paths).
redeployNoRebuild right after saving, so the pod builds the latest commit of the branch with the new settings. Set false to only save the settings.
repoUserNoUsername to pair with repoToken. Usually omit it: the pod picks the form the git host expects (GitHub x-access-token, GitLab oauth2, ...).
apiPrefixNoRequests under this path go to the backend; everything else is served from outputDir. Defaults to /api.
outputDirNoFolder with the static build output, relative to rootDir (e.g. dist), served by nginx. Set this, startCommand, or both.
repoTokenNoAccess token for a private repository. Stored encrypted and never returned. Use a token scoped to that one repository.
buildCommandNoRuns once per deploy, inside the pod, from rootDir (e.g. 'npm ci && npm run build'). Omit for the default of the detected runtime.
startCommandNoLong-running backend process (e.g. 'node server/index.js'); restarted if it exits. It must listen on appPort. Set this, outputDir, or both.

Output Schema

NameRequiredDescriptionDefault
idYesInstance id.
appYesThe stored app configuration. env values are masked (***abcd); the repository token is never returned.
nextYesSuggested next step for the caller.
savedYesThe new settings were stored.
statusYesInstance lifecycle status after the call.
redeployedYesTrue when a rebuild from the latest commit was started and returned without error.
endpointUrlYesPublic HTTPS address of the app.
rebuildErrorYesWhy the rebuild failed when the settings were saved but the rebuild was refused; null otherwise.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only mark the tool as destructive and open-world; the description adds substantial behavioral context beyond that: the build runs inside the pod on linux/amd64, /data persists across rebuilds, a start command is restarted if it exits, a failed build does not take down the previous version, and masked env values are either preserved or refused depending on whether the key was ever set. These are exactly the operational consequences an agent needs before invoking a destructive mutation.

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 purpose and default behavior are front-loaded in the first sentence, and later clauses each carry distinct operational facts (persistence, failure behavior, env masking, engine restriction) rather than filler. It is a dense wall of text without structural breaks, which slightly hurts scanability, but no sentence is genuinely wasted.

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 a 14-parameter nested schema, an output schema, and only sparse annotations, the description covers the mutation's blast radius, persistence and failure semantics, runtime constraints, and the partial-update contract. An agent can call this tool correctly and predict its side effects without consulting other documentation.

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

Parameters3/5

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

Schema coverage is 100%, so the baseline is 3 and the schema already documents every field including the masking convention and repoToken encryption. The description reinforces the partial-update semantics ('Only the fields you send change') and the deferred effect of settings when redeploy is false, but it mostly restates what the schema already provides rather than adding new parameter-level meaning.

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 an app instance's settings') and enumerates the mutable fields (repo, branch, rootDir, runtime, build/start commands, outputDir, appPort, apiPrefix, env, repoToken) plus the default side effect (redeploy). It also scopes the tool precisely with 'Only for instances whose engine is app,' which separates it from instance-level siblings such as rebuild_instance.

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?

Gives clear when-to-use context: only for app-engine instances, and redeploy=false when you want to save settings without rebuilding. It also routes the agent to get_app_build for observing build state after errors. It does not explicitly contrast with rebuild_instance for rebuilds that require no settings change, so it falls just short of full alternative guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.