Skip to main content
Glama

Attach database

attach_database

Create a Postgres database for the project. Sets DATABASE_URL; restart the preview (stop_preview + start_preview) so the running app sees it.

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

Input Schema

NameRequiredDescriptionDefault
project_idNoProject id (or use session from use_project)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations declare the operation is not read-only, not idempotent and not destructive, and the description usefully adds that DATABASE_URL is set and that a restart is required for the change to take effect. It omits whether an existing database/URL is overwritten or rejected (relevant since idempotentHint=false) and whether any cost or credential provisioning is involved.

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?

Two short sentences with no filler, and the side effect plus required follow-up are front-loaded right after the action. Slightly clipped grammar ("Sets DATABASE_URL") but nothing 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?

For a single-parameter provisioning tool with no output schema, the definition covers the action, the persistent side effect, and the required follow-up step. Only edge cases (existing database, failure modes) are left unspecified.

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, which the schema already documents including the session fallback, so the baseline of 3 applies. The description's "for the project" vaguely gestures at that parameter but adds no new meaning.

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 description names a specific verb and resource ("Create a Postgres database") plus the concrete side effect ("Sets DATABASE_URL"), which cleanly separates it from the sibling detach_database and from storage-related tools.

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 gives an explicit post-call workflow: restart the preview via stop_preview + start_preview so the running app picks up the variable, naming the exact siblings to use. It stops short of stating when this tool is preferable to alternatives such as enable_storage, or what happens if a database is already attached.

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