Skip to main content
Glama

Provision Postgres database

provision_postgres
Idempotent

Provision the project's managed Postgres database and inject DATABASE_URL into the app's environment — the same action as the dashboard's Settings → Postgres button; no external Postgres provider or pasted connection string is needed. Idempotent: a project that already has one gets its current state back (already_provisioned=true) and nothing is created. Returns the env var names that are now set, with masked values — the app reads them from its process environment at runtime. Deployed commits are rolled so the new variable lands in the running pods. Requires a read-write token.

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": {
      "project_id": "<project_id>"
    },
    "name": "provision_postgres"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNooptional provisioning mode: disk (Postgres or S3 in the project's own data pod on its disk) or nas (object storage only: a bucket on the shared server; refused for Postgres). Omit to use the platform default; Postgres is always disk. A second call on an already-provisioned project returns the current mode and ignores this field
project_idYesthe project id (from list_projects or deploy_files)

Output Schema

NameRequiredDescriptionDefault
kindYes
modeNo
messageYes
env_varsYes
repairedYes
convergedYes
project_idYes
resource_nameNo
rolled_commitsNo
already_provisionedYes
env_secret_digest_afterNo
env_secret_digest_beforeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / mode / description
      Previous value: -"optional provisioning mode: nas (shared servers) or disk (Postgres and S3 as sidecars on the commit disk). Omit to use the platform default. A second call on an already-provisioned project returns the current mode and ignores this field"New value: +"optional provisioning mode: disk (Postgres or S3 in the project's own data pod on its disk) or nas (object storage only: a bucket on the shared server; refused for Postgres). Omit to use the platform default; Postgres is always disk. A second call on an already-provisioned project returns the current mode and ignores this field"
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare non-read-only, idempotent, non-destructive, closed-world, so the bar is met; the description goes further by disclosing exactly what idempotency returns (already_provisioned=true), that env values come back masked, that pods are rolled so the variable reaches running deployments, and the read-write token requirement. These are operational consequences an agent cannot get from the annotations.

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?

Front-loads the action and its effect, then the idempotency contract, then auth. It is dense but every sentence carries information; a few clauses (dashboard button reference, runtime environment remark) are slightly redundant but aid recognition rather than clutter.

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 single-required-param provisioning mutation with an output schema, the description covers purpose, idempotency semantics, side effects on deployments, auth requirement, and what is returned (env var names, masked). Nothing an agent needs to call it safely and interpret the result is missing.

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 schema already documents project_id and mode fully. The description adds only indirect meaning (no connection-string parameter exists, Postgres uses the disk mode) while the mode behavior is already spelled out in the schema. Baseline 3 applies since the schema does the heavy lifting.

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?

Specific verb plus resource ("Provision the project's managed Postgres database") with the concrete side effect named (inject DATABASE_URL). It explicitly contrasts with the alternative path by ruling out an external Postgres provider or pasted connection string, and it distinguishes itself from provision_storage by being Postgres-specific.

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 states the situation to use it (managed Postgres, no external provider/connection string) and the when-not condition via the idempotency clause: an already-provisioned project returns current state and creates nothing. It also states the read-write token requirement. It does not name provision_storage as the sibling to pick for non-Postgres storage, so guidance is strong but not fully routed.

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