Skip to main content
Glama

Run a project action

RunProjectAction
Destructive

One project action: start, stop or restart services, recreate one, back up, restore, cancel an operation, change the source or a database's size, delete an undeclared volume or the project. Recreate, back up, restore, set_database_size, delete and set_source's deploy run as operations (operation_id), waited for (wait_seconds), as is the end of a cancelled one; the others are done on return. Answers with the project as it then is. With no services, start_services starts those with a container and restart_services the running ones. restore_snapshot takes the project's own snapshots only: a deleted app's data in a shared database is in that database's snapshots. A database's snapshot as a new database beside it is CreateDatabase's, with from_snapshot_id.

delete_project: a final backup while backups are on, then containers, volumes, files, hosts, logs, and an app's user and database of its own in a shared database, data and all. Snapshots stay (GetMachine.deleted_projects), and restoring one brings the project back, source included; with backups off there is none, and it is gone for good. The databases it was linked to stay: delete each with its own delete_project.

set_database_size gives a database another of its engine's sizes (Machine.database_engines; its size now is Project.database.memory_limit_bytes): the machine writes its compose.yaml anew for that size, with the settings that follow from it, so never edit them by hand, and with the image it runs and the other flags of its command as they were written, a server setting added or changed there included; what else was written there goes. The database restarts, and its apps lose their connections for a few seconds: one that does not connect again shows as restarting (GetMachine). A size changes nothing on the bill: a smaller one only leaves memory to the other projects. A Valkey whose data is more than the size keeps (its maxmemory, 70 % of the size) is refused before anything changes, and the refusal gives both figures: FAILED_PRECONDITION + DatabaseSizeRefusal, as for a Valkey that does not answer now, asked to shrink, and a database whose data is in another volume than the one the file names. FAILED_PRECONDITION alone = the project is no database. INVALID_ARGUMENT = a size its engine does not offer (the message lists them).

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": "RunProjectAction"
  }
}

Input Schema

NameRequiredDescriptionDefault
back_upNoBacks up the directory and volumes now, live. An operation. FAILED_PRECONDITION = backups off (Machine.backups_enabled).
workspaceNoThe workspace: its id or name (ListWorkspaces). Omit when the account has one.
project_idNo
set_sourceNoChanges the source. To files: keeps the current files. To github: only the fields set change, e.g. {github: {auto_deploy: true}} follows pushes again; from files, repository is required. Deploys the newest commit if auto_deploy is on and the files are not at it. FAILED_PRECONDITION = as CreateProject. Where the files come from (THE PROJECT IS ITS DIRECTORY). At most one of files, github.
operation_idNoAs DeployProject's.
wait_secondsNoAs DeployProject's.
delete_volumeNoA volume compose.yaml no longer declares (Volume.declared false). Its data then lives only in snapshots. FAILED_PRECONDITION = declared or in use.
stop_servicesNoStops services, each with its grace period. A machine restart may start them, per restart policy.
delete_projectNoAn operation: RunProjectAction's description says what goes and what stays.
start_servicesNoStarts stopped services and reruns jobs, not their dependencies. FAILED_PRECONDITION = no container yet (deploy or recreate_service), or a published machine port is taken.
cancel_operationNoStops a running or starting operation: it ends CANCELLED, leaving what a failure would; one only starting answers CANCELLED from its own call. FAILED_PRECONDITION = a delete past its final backup.
recreate_serviceNoA new container: a fresh filesystem outside volumes. An operation.
restart_servicesNoRestarts processes in the same containers. Codes as start_services.
restore_snapshotNoFrom a snapshot of this project. An operation.
set_database_sizeNoA database's size. An operation: it restarts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / workspace
      Added value: +{
      +  "description": "The workspace: its id or name (ListWorkspaces). Omit when the account has one.",
      +  "type": "string"
      +}
  2. Changed8 schema fields changed
    • changedInput schema / description
      Previous value: -"At most one of start_services, stop_services, restart_services, recreate_service, back_up, restore_snapshot, cancel_operation, delete_project, set_source, delete_volume."New value: +"At most one of start_services, stop_services, restart_services, recreate_service, back_up, restore_snapshot, cancel_operation, delete_project, set_source, delete_volume, set_database_size."
    • changedInput schema / properties / delete_project / description
      Previous value: -"An operation: a final backup while backups are on, then containers, volumes, files, hosts, logs. Snapshots stay (GetMachine.deleted_projects), and restoring one brings the project back, source included; with backups off there is none, and it is gone for good."New value: +"An operation: RunProjectAction's description says what goes and what stays."
    • changedInput schema / properties / operation_id / description
      Previous value: -"As DeployProject's, for the actions that run as operations."New value: +"As DeployProject's."
    • changedInput schema / properties / restart_services / properties / services / description
      Previous value: -"Empty = all (start: those with a container; restart: running ones)."New value: +"Empty = all."
    • addedInput schema / properties / set_database_size
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "A database's size. An operation: it restarts.",
      +  "properties": {
      +    "memory_limit_bytes": {
      +      "description": "One of Machine.database_engines[].sizes.",
      +      "minimum": 0,
      +      "type": "integer"
      +    }
      +  },
      +  "type": "object"
      +}
    • changedInput schema / properties / start_services / properties / services / description
      Previous value: -"Empty = all (start: those with a container; restart: running ones)."New value: +"Empty = all."
    • changedInput schema / properties / stop_services / properties / services / description
      Previous value: -"Empty = all (start: those with a container; restart: running ones)."New value: +"Empty = all."
    • changedInput schema / properties / wait_seconds / description
      Previous value: -"As DeployProject's, for the actions that run as operations."New value: +"As DeployProject's."
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Far exceeds the annotations (readOnly=false, destructive=true): it spells out exactly what delete_project removes and what survives (snapshots, linked databases), that restore brings a deleted project back, that set_database_size rewrites compose.yaml and drops hand edits, that the database restarts and apps lose connections, and the FAILED_PRECONDITION/INVALID_ARGUMENT semantics. That is precisely the context annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The action inventory is front-loaded, which is right, but the delete_project and set_database_size paragraphs are dense run-on prose with cryptic fragments such as 'what else was written there goes' and 'the refusal gives both figures'. Length is defensible for an eleven-action tool, yet several sentences could be tightened without losing meaning.

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?

For a 15-parameter multiplexed mutation tool with no output schema, the description covers side effects, restart behavior, billing impact, retained snapshots, cancellation outcomes and error codes, and states the return value ('Answers with the project as it then is'). Nothing an agent needs before invoking it is missing.

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 93%, so the baseline is 3; the description adds real meaning on top by explaining that with an empty services list start_services only starts those with a container while restart_services targets running ones, and by deferring operation_id/wait_seconds semantics to DeployProject. It does not explain the mutual-exclusion rule beyond what the schema already states.

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?

The opening sentence names a specific verb-plus-resource and then enumerates every action the tool multiplexes (start/stop/restart, recreate, back up, restore, cancel, set_source, set_database_size, delete_volume, delete_project), so an agent can tell exactly what it covers. It also differentiates itself from siblings by pointing at CreateDatabase for the from_snapshot_id case and at per-database delete_project for linked databases.

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?

It states which actions run as operations (recreate, back up, restore, set_database_size, delete, set_source's deploy) versus which complete on return, and routes two adjacent cases to other tools (CreateDatabase with from_snapshot_id; per-database delete_project). What it lacks is an explicit statement of when to pick RunProjectAction over DeployProject or RunMachineAction beyond the action list.

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