Skip to main content
Glama
lobster-kit

lobsterdb

Official
by lobster-kit

Run Schema Migration

migrate

Apply tracked schema changes (DDL) like CREATE TABLE or ALTER TABLE to a database. Migrations are idempotent, so running the same name multiple times is safe.

Instructions

Apply a schema change (DDL) to a database. Migrations are tracked in _lobsterdb_migrations and are idempotent — safe to call multiple times with the same name.

Guidelines:

  • Use for all DDL: CREATE TABLE, ALTER TABLE ADD COLUMN, CREATE INDEX, etc.

  • Name migrations descriptively: "create_cards_table", "add_favorite_to_cards", "add_price_index"

  • ADDITIVE changes (add columns, create tables): apply without asking the user.

  • DESTRUCTIVE changes (DROP TABLE, DROP COLUMN, RENAME, changing column types): always confirm with the user before running.

  • Never use query for DDL — always use migrate so changes are tracked.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesDDL SQL to apply. Can include multiple statements separated by semicolons.
nameYesShort snake_case migration name, e.g. "create_cards_table" or "add_favorite_column"
databaseIdYesThe database ID to migrate

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden — and it does: idempotency is disclosed, the tracking table is named, and destructive-vs-additive behavior (and required user confirmation for the former) is spelled out. This is exactly the safety context an agent needs before a mutation.

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-loaded one-sentence purpose followed by a tightly scoped guidelines list. Every bullet earns its place — DDL scope, naming, additive/destructive handling, and the query alternative — with no filler.

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 no-annotation, no-output-schema mutation tool, the description covers operation scope, idempotency, tracking, and the safety decision tree. Nothing an agent needs to call this correctly 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 description coverage is 100%, so the schema already documents all three parameters. The description's naming convention hint ('create_cards_table') largely repeats the schema's own example, adding only marginal value beyond structured data; 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?

States a specific verb+resource — applying a DDL schema change to a database — and adds scope detail (tracked in _lobsterdb_migrations, idempotent). It explicitly distinguishes itself from the sibling 'query' tool, so an agent can tell them apart without opening schemas.

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?

Explicit when-to-use: all DDL including CREATE TABLE, ALTER TABLE, CREATE INDEX. Names the alternative and forbids it ('Never use query for DDL'). Also splits additive vs destructive operations with a clear confirm-with-user rule for destructive ones.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.