Skip to main content
Glama

Deploy a project

DeployProject
Destructive

Deploys a new version of a project and answers as CreateProject does: files written over its own (/.env, /compose.yaml, a source file), x_pethost (name, routes, password), mount_volume, a new archive (upload_id, which replaces all files but /.env and x-pethost), a commit, or an earlier deploy's files again as a new version (rollback_deploy_id; /.env, x-pethost and volumes stay). compose.yaml rules: CreateProject's.

It builds build: images, pulls missing ones, runs compose up on the whole project and waits until each service runs (healthy, if it has a healthcheck) or each job exits 0, and until each routed service listens on its route's port (up to 15 s: one that does not is the project's SERVICE_PORT_CLOSED problem, its route answering 502, not a failed deploy). So it also starts stopped services, reruns jobs, recreates changed services and those bind-mounting project files, and fails on an unhealthy service. While Project.x_pethost_applies_at_once, a version differing only in x-pethost (or not at all) applies at once, restarting nothing but a service whose published port a route takes or leaves. Any other deploy applies its routes and password as it ends: to hide new content from its first second, set the password first, in a call of its own, then deploy the content.

A commit other than GithubSource.newest_commit turns auto_deploy off (pinned), even if it fails; only set_source turns it back on.

NOT_FOUND = no such project, or no such kept deploy. ABORTED = base_deploy_id is not Project.deploy_id: reread, redo. FAILED_PRECONDITION = as CreateProject, or commit not on the branch. RESOURCE_EXHAUSTED = too many or too large files: send them with CreateTransfer. ALREADY_EXISTS = operation_id started another kind of operation. When it FAILED, Operation.made_current says whether the files were applied: then fix them, or roll back.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "DeployProject"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesNoWritten in order over the current files, or over the new version's: e.g. [{path: "/.env", text: "…"}] writes that file whole, and the files not named stay. With no new version pethost.compose.yaml is refused: write /compose.yaml. github: only /.env. None = redeploy.
commitNogithub project: a commit of its branch (SHA, ≥7 chars), from ListCommits.
upload_idNofiles project: an archive from CreateTransfer.
workspaceNoThe workspace: its id or name (ListWorkspaces). Omit when the account has one.
x_pethostNoEdits x-pethost by part, after `files`: metadata by key; routes all at once. x-pethost as data. Absent parts stay.
project_idNo
mount_volumeNoNot with upload_id, or github. Adds `<volume>:<container_path>` to the service, declaring the volume if needed.
operation_idNoFor a safe retry: the same id returns the first call's operation and starts nothing. [A-Za-z0-9][A-Za-z0-9._-]*, ≤128 chars; empty = generated.
wait_secondsNoSeconds to wait for the deploy's end, ≤45. Absent = 45; 0 = answer once it started. Still IN_PROGRESS then: GetOperation waits on.
newest_commitNogithub project: true = GithubSource.newest_commit, read now.
base_deploy_idNoProject.deploy_id as you read it. Empty = no check.
timeout_secondsNoFor the whole deploy, builds included; 0 = default.
rollback_deploy_idNofiles project, a rollback: the operation_id of an earlier deploy with files_kept (Project.operations).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / base_deploy_id / description
      Previous value: -"Project.deploy_id as you read it: ABORTED if the project was deployed since. Empty = no check."New value: +"Project.deploy_id as you read it. Empty = no check."
    • changedInput schema / properties / rollback_deploy_id / description
      Previous value: -"files project, a rollback: the operation_id of an earlier deploy with files_kept (Project.operations). Its files return as a new version; /.env, x-pethost and volumes stay."New value: +"files project, a rollback: the operation_id of an earlier deploy with files_kept (Project.operations)."
    • changedInput schema / properties / upload_id / description
      Previous value: -"files project: an archive from CreateTransfer; replaces all files but /.env and x-pethost."New value: +"files project: an archive from CreateTransfer."
    • addedInput schema / properties / workspace
      Added value: +{
      +  "description": "The workspace: its id or name (ListWorkspaces). Omit when the account has one.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description adds substantial behavior beyond them: builds build: images, pulls missing ones, runs compose up, waits on healthchecks/jobs, and crucially clarifies that a route not listening within 15s is a SERVICE_PORT_CLOSED problem with a 502 route rather than a failed deploy. It also discloses the x_pethost_applies_at_once shortcut behavior, which deploy variants pin auto_deploy, and maps each status code (NOT_FOUND, ABORTED, FAILED_PRECONDITION, RESOURCE_EXHAUSTED, ALREADY_EXISTS) to its cause and remedy.

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?

Length is proportionate to a 13-parameter, deeply nested deploy tool, and almost every clause carries operational information (port semantics, route replacement, made_current remediation) rather than restating the schema. The weakness is structure: the second sentence runs roughly ninety words as a chain of clauses, and the compose/FailedPrecondition references to CreateProject are stated twice. Purpose is front-loaded, but scanability suffers.

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?

With no output schema and nested objects, the description carries real burden and mostly meets it: it explains waiting semantics bounded by wait_seconds, names Operation as the handle, and explains Operation.made_current after failure. It stops short of stating plainly that the call returns an Operation (and its deploy identifier) on success, leaving that to be inferred from the error and retry discussion.

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 already 92%, so the baseline is 3, but the description adds meaning the schema does not: the mutual exclusion 'at most one of upload_id, commit, newest_commit, rollback_deploy_id' and 'none = the current one,' plus what a rollback preserves (/.env, x-pethost, volumes) versus what an archive replaces (everything but /.env and x-pethost). It also explains base_deploy_id as a stale-read guard whose mismatch yields ABORTED. The cross-parameter interplay is the main value added.

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?

Opens with a specific verb and resource: 'Deploys a new version of a project,' then enumerates exactly what constitutes a new version (files, x_pethost, mount_volume, upload_id, commit, rollback_deploy_id). It differentiates itself from CreateProject by reference ('answers as CreateProject does') and states the no-version case ('None = redeploy'), so an agent can tell deploy-a-version apart from create-a-project.

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 concrete routing and sequencing advice: send oversized files via CreateTransfer, use GetOperation to wait on an IN_PROGRESS deploy, and set the password in a separate call before deploying content to hide new content. It also explains the auto_deploy consequence of pinning a commit and that only set_source undoes it. What it lacks is an explicit statement of when to prefer this over CreateProject for a first-time setup, though that is strongly implied by 'new version'.

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.

Resources