Skip to main content
Glama

Add database

add_database
Idempotent

Give a spawnpoint project its own Postgres database. The database is created on spawnpoint's managed server and the app is restarted with DATABASE_URL set (persisted like any env var, so it survives redeploys); the app connects with any Postgres client library and creates its own tables. Idempotent: calling it again returns the same database. Use it when the app needs real relational storage that outlives its machine; for a SQLite file or uploads, the persistent data directory (SPAWNPOINT_DATA_DIR) needs no call at all. Refused if the user already set a DATABASE_URL of their own. When the project is terminated the database is kept for 7 days, restorable from the console into a project deployed under the same name, then dropped. While get_project shows database.backups, spawnpoint copies it every night, kept 30 days (7 on the Free plan); no tool restores a copy: to get back data lost to a bad migration or a delete, give the user backups.restore_url, where they restore a night.

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

Input Schema

NameRequiredDescriptionDefault
project_idYesthe id of the project

Output Schema

NameRequiredDescriptionDefault
envNo
noteYes
statusYes
databaseNo
project_idYes

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?

Annotations declare idempotency and non-destructiveness, and the description adds substantially beyond them: the app is restarted with DATABASE_URL set and that value persists across redeploys, the call is refused if the user supplied their own DATABASE_URL, and the database is kept 7 days after project termination before being dropped. It also discloses nightly backups with retention windows (30 days, 7 on Free), that no tool restores a copy, and that recovery goes through backups.restore_url – exactly the operational context an agent needs before invoking a state-creating tool.

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?

Purpose is front-loaded, then behavior, then lifecycle/backups. The long backup sentence is dense and slightly overpacked, but every clause carries distinct operational meaning, so little is wasted.

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?

An output schema exists so return values needn't be explained, and the description covers creation, persistence, refusal, idempotency, and post-termination retention plus backup recovery. The one omission is that it never names remove_database or rotate_database_password as the follow-on tools, leaving lifecycle management to be inferred.

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% for the single project_id parameter, so the schema already carries the parameter meaning. The description says nothing extra about project_id (e.g., whether it must be an existing, non-terminated project), 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?

The opening sentence names a specific verb and resource: 'Give a spawnpoint project its own Postgres database.' It is immediately distinguishable from siblings like add_storage or add_custom_domain because it names Postgres explicitly and scopes to 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit when-to-use ('when the app needs real relational storage that outlives its machine'), a named non-use case with the alternative ('for a SQLite file or uploads, the persistent data directory (SPAWNPOINT_DATA_DIR) needs no call at all'), and a refusal condition (user already set DATABASE_URL). That covers use, avoid, and edge case without inference.

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.