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.

Input Schema

NameRequiredDescriptionDefault
modeNooptional 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
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. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: idempotent short-circuit with already_provisioned=true, no-op on re-call, masked return values, env vars read from process environment at runtime, deployed commits rolled so the variable reaches running pods, and the read-write token requirement. This is exactly the mutation-and-side-effect detail the agent needs.

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?

Front-loads the action and effect, then layers idempotency, return shape, rollout consequence, and auth in descending order of importance. Dense with zero filler despite several distinct claims.

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?

Covers purpose, idempotency, side effects on deployed commits, auth requirements, and return semantics; with an output schema present, nothing an agent needs before invoking 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% and the mode field is already fully self-documented in the schema (nas vs disk, omit for default, ignored on repeat calls). The description adds no syntax or format detail beyond that, so baseline 3 applies.

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 and resource ('Provision the project's managed Postgres database'), plus the concrete effect of injecting DATABASE_URL. It draws a clear boundary against the alternative approach ('no external Postgres provider or pasted connection string is needed'), which separates it from set_env_vars and provision_storage.

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 a strong usage signal by anchoring to a known UI action (Settings → Postgres) and stating the precondition of a read-write token. It does not name sibling tools (e.g. provision_storage, execute_sql) or state when not to use it, so it falls short of full when/when-not routing.

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