Skip to main content
Glama
platypus-db

platypus-db

Official

compare_schemas

Compares two database schemas to report added, dropped, or changed tables, columns, indexes, foreign keys, and constraints, and returns a migration script without executing it.

Instructions

Compares two schemas, of one connection or of two connections of the same kind of database, as the PlatypusDB schema compare does: the differences (tables, columns, indexes, foreign keys and constraints added, dropped or changed) and the migration script that makes other_schema like schema, as text. Nothing runs: the script reaches the user only through propose_sql. A script too long for max_bytes (default 32768) is left out whole and the answer says so: it is never cut.

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": {
      "connection": "<connection>",
      "schema": "<schema>",
      "other_schema": "<other_schema>"
    },
    "name": "compare_schemas"
  }
}

Input Schema

NameRequiredDescriptionDefault
schemaYesThe model schema (a database in MySQL, `main` in SQLite and DuckDB).
max_bytesNoBytes of output at most (default 32768, up to 1048576).
connectionYesThe connection with the schema that is the model, as `list_connections` shows it.
other_schemaYesThe schema the script would change to make it like `schema`.
timeout_secondsNoSeconds each schema may take to read before it is cancelled (default 30, up to 300).
other_connectionNoThe connection with the schema to change; left out, the same connection.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.2

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so well: it declares the tool is non-executing ("Nothing runs"), discloses the max_bytes truncation policy including that an oversized script is omitted whole rather than cut and that the answer says so, and notes the default limit of 32768. These are exactly the behavioral traits an agent needs before calling.

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?

Three sentences, front-loaded with the core comparison and its outputs, then the no-execution routing, then the truncation rule. Every sentence adds information and none repeats the schema.

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 six-parameter, non-mutating tool with no output schema, the description covers outputs, safety, and size limits; the schema covers the rest of the parameters. Minor gaps remain, such as what happens when the two connections are different database kinds, but nothing critical is missing for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: the directionality of the comparison ("the migration script that makes `other_schema` like `schema`") and the consequence of max_bytes on output shape. It stops short of explaining interaction between timeout_seconds and partially-read schemas.

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 and resource ("Compares two schemas") plus the concrete outputs: differences in tables, columns, indexes, foreign keys and constraints, and the migration script as text. It also bounds scope (one connection, or two connections of the same kind of database), which separates it from siblings like get_ddl or describe_table.

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 clear conditions for use: comparing schemas within one connection or across two connections of the same database kind, and it routes execution elsewhere by saying "the script reaches the user only through propose_sql." It does not spell out exclusions (e.g., when to prefer get_ddl or estimate_change instead), so it falls short of a full when/when-not treatment.

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