Skip to main content
Glama
Teja-sudo

postgres-mcp-server

by Teja-sudo

transfer_objects

Transfer database schema and data between PostgreSQL servers or databases with topological ordering. Supports dry-run to preview SQL changes.

Instructions

Transfer schema (DDL) and/or data from one configured server/database to another (same server, different DB, or fully remote). Builds on the introspection module for DDL extraction with topological ordering. Modes: include='ddl'|'data'|'both'. Behavior on existing target objects: if_exists='skip'|'replace'|'error'. dry_run=true emits the would-be SQL to output_file or returns inline (no target writes). Both endpoints must be configured servers (PG_NAME_*); ad-hoc connection strings are not accepted (security). Refuses if target's effective access mode is readonly. FK constraints between tables are emitted as ALTER TABLE statements appended after tables to handle inter-table dependency cycles.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromYesSource endpoint.
toYesTarget endpoint.
objectsYesList of objects, or '*' for all objects in source schema.
includeNoboth
if_existsNoBehavior when a target object already exists.error
data_strategyNoinsert_batches
dry_runNoGenerate SQL without applying. Use with output_file.
output_fileNoWhen dry_run is true, write generated SQL to this .sql path.
Behavior5/5

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

With no annotations, the description fully discloses behavior: modes, if_exists handling, dry_run SQL generation, FK constraint ordering, and security/readonly checks, leaving no ambiguity.

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 slightly verbose but well-structured with front-loaded main purpose and detailed specifics; every sentence adds value, though some redundancy exists (e.g., 'both endpoints must be configured servers' repeated).

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?

Given complexity (8 params, no output schema), the description covers all key aspects: modes, conflict resolution, dry run, security, readonly enforcement, and FK handling, making it self-contained and complete.

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 75%; the description explains the purpose of 'include', 'if_exists', 'dry_run', and 'output_file' beyond the schema, clarifying their interaction and constraints.

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 clearly states the tool transfers DDL and/or data between servers/databases, specifying modes ('ddl', 'data', 'both'), which distinguishes it from sibling tools like 'export_to_sql_file' or 'execute_sql'.

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?

Provides conditions: endpoints must be configured servers, refuses if target is readonly, and mentions security (no ad-hoc connection strings). However, it lacks explicit comparison to alternatives or when not to use this tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Teja-sudo/postgres-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server