Skip to main content
Glama

Propose a Project Database migration

propose_project_database_migration

Propose a governed schema migration for an active Project Database. Supply an ordered array with one PostgreSQL statement per entry. The immutable artifact is classified as additive or destructive; privileged commands are refused. Does not apply SQL. Migration responses include request_review: adding unrelated tables preserves existing approvals; changes to referenced schema objects can interrupt affected Requests. Some changes still invalidate every Request on the datasource: a removed or changed function, a sequence no table owns, a new function whose name already resolves or is named by existing function code, or a stored schema fingerprint the Engine cannot recognize. After apply or an uncertain response, list migration history for recorded affected Requests, current policy states, and review URLs. If request_review.state is unavailable, the recorded migration outcome remains valid but its affected_requests is null; refresh history before resuming applications. Review stale approvals through existing Request review/update flows; do not automatically reapprove or retry application writes.

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": {
      "datasource_id": "<datasource_id>",
      "label": "<label>",
      "statements": "<statements>"
    },
    "name": "propose_project_database_migration"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelYesPurpose of the migration, at most 200 characters
statementsYesOrdered PostgreSQL statements; one statement per entry, at most 100 entries
datasource_idYesProject Database datasource UUID
setup_step_idNoOptional setup step UUID this call fulfils (Administrator only). Pass a planned entry you recorded, or the id of the step this Project already opened for the same component. Otherwise the same MCP session's oldest unbound plan of this kind matching its subject hint is used, otherwise a new entry opens. A committed creation whose journal binding fails still succeeds with a warning naming this entry; do not repeat creation. Other steps this call opens record the step's Application unless application_id names one.
application_idNoOptional Application UUID whose build this call serves (Administrator only). Setup steps this call opens record it, so they show on that Application's build screen; the resources themselves stay shared by the Project. A shared step it reuses keeps the Application it was opened for, so a step it returns may be watchable with get_setup_journal only without application_id. Use the build's application_id, the one you call describe_application with.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior5/5

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

Far beyond the annotations: it discloses that the artifact is immutable, that statements are classified additive or destructive, that privileged commands are refused, and it enumerates the specific cases that invalidate every Request on the datasource (changed/removed functions, unowned sequences, name-resolution collisions, unrecognized schema fingerprints). It also explains the request_review semantics and the null affected_requests failure mode, which an agent could not infer from readOnlyHint=false / destructiveHint=false alone.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded, but the middle is a run-on sentence enumerating invalidation triggers, and the closing sentences mix operational advice with policy ('do not automatically reapprove or retry'). Much of the edge-case detail is valuable but is packed densely enough that an agent must re-read to extract the actionable ordering.

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 governed mutation-adjacent tool with no output schema, the description covers artifact immutability, refusal behavior, invalidation risk, review-state degradation, and remediation steps. The remaining gap is the missing hand-off to the dry_run and apply siblings, which an agent needs in order to sequence the workflow correctly.

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%, so the schema already documents label, statements, datasource_id, setup_step_id, and application_id in detail. The description restates the ordered-statement requirement but adds no new meaning about the two optional binding parameters. Baseline 3 is appropriate when structured fields carry the parameter burden.

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 opening sentence names a specific verb and resource ('Propose a governed schema migration for an active Project Database') and clarifies the payload shape (one PostgreSQL statement per array entry). The clause 'Does not apply SQL' functionally separates it from the apply/dry_run siblings without naming them, which is nearly but not fully explicit differentiation.

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 rather than stated: the agent learns this creates an immutable artifact and does not apply SQL, but is never told to call dry_run_project_database_migration first or apply_project_database_migration afterwards. The later guidance ('After apply or an uncertain response, list migration history') is genuinely useful post-use direction, but the when-to-use-vs-alternatives decision is left to 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.

Resources