Skip to main content
Glama

Postgres MCP Server

data

Execute PostgreSQL database operations including insert, update, delete, and bulk actions with data validation for efficient table management.

Instructions

Data operations: insert, update, delete, bulk operations with validation

Input Schema

NameRequiredDescriptionDefault
actionYesAction: insert (single row), update (modify rows), delete (remove rows), bulk_insert (multiple rows), bulk_update (batch update), truncate (empty table)
dataNoData object for insert/update (key-value pairs)
optionsNoOperation options
rowsNoArray of data objects for bulk operations
schemaNameNoSchema name (default: public)public
tableNameYesTable name (required for all actions)
whereNoWHERE conditions for update/delete operations

Input Schema (JSON Schema)

{ "properties": { "action": { "description": "Action: insert (single row), update (modify rows), delete (remove rows), bulk_insert (multiple rows), bulk_update (batch update), truncate (empty table)", "enum": [ "insert", "update", "delete", "bulk_insert", "bulk_update", "truncate" ], "type": "string" }, "data": { "description": "Data object for insert/update (key-value pairs)", "type": "object" }, "options": { "description": "Operation options", "properties": { "onConflict": { "description": "ON CONFLICT action (DO NOTHING, DO UPDATE)", "type": "string" }, "returning": { "description": "Columns to return", "items": { "type": "string" }, "type": "array" }, "validate": { "default": true, "description": "Validate data before operation", "type": "boolean" } }, "type": "object" }, "rows": { "description": "Array of data objects for bulk operations", "items": { "type": "object" }, "type": "array" }, "schemaName": { "default": "public", "description": "Schema name (default: public)", "type": "string" }, "tableName": { "description": "Table name (required for all actions)", "type": "string" }, "where": { "description": "WHERE conditions for update/delete operations", "type": "object" } }, "required": [ "action", "tableName" ], "type": "object" }

Other Tools from Postgres MCP Server

Related Tools

    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/itsalfredakku/postgres-mcp'

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