Skip to main content
Glama

Database actions

db
DestructiveIdempotent

action "migrate": apply pending migrations/*.sql files to the preview database, in order, each in its own transaction (an automatic snapshot is taken first). Production is migrated when you publish.

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": "<project>",
      "action": "<action>"
    },
    "name": "db"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYes
projectYesProject slug or id.
idempotency_keyNoAny unique string; a repeated call with the same key has no second effect.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Beyond the annotations, the description discloses that migrations run in order, each in its own transaction, and that an automatic snapshot is taken first. It also clarifies production migration timing. These details add substantial behavioral context for a destructive operation, though failure handling is not described.

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?

The description is a single front-loaded sentence focused on the migrate action. It is dense but well structured, with every clause contributing relevant operational context.

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 small tool with three parameters, no output schema, and annotations covering safety and idempotency, the description provides enough operational context to invoke the migrate action correctly. It could be more complete by covering failure or rollback behavior, but the core invocation context is present.

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 67%, and the schema already documents project and idempotency_key. The description adds meaning for the migrate action beyond the bare enum value, but it does not further explain project or idempotency_key behavior.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the migrate action applies pending migrations/*.sql files to the preview database, including ordering and transaction behavior. It does not explicitly differentiate this tool from sibling database tools such as db_schema, but the operation itself is specific enough to identify.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Usage is implied: use this to apply pending migration files to the preview database. The description notes that production is migrated only when publishing, which gives useful context, but it does not explicitly state when not to use this action or name alternatives.

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