Skip to main content
Glama

Postgres MCP Server

tables

Manage PostgreSQL database tables by listing, creating, altering, dropping tables, and retrieving detailed table information through structured operations.

Instructions

Table management: list, create, alter, drop tables and get detailed table information

Input Schema

NameRequiredDescriptionDefault
actionYesAction: list (all tables), info (table details), create (new table), drop (remove table), add_column (add column), drop_column (remove column), rename (rename table)
columnNameNoColumn name (required for add_column, drop_column)
columnsNoColumn definitions for create action
dataTypeNoData type (required for add_column)
newNameNoNew name (required for rename action)
optionsNoAction-specific options
schemaNameNoSchema name (default: public)public
tableNameNoTable name (required for info, create, drop, add_column, drop_column, rename)

Input Schema (JSON Schema)

{ "properties": { "action": { "description": "Action: list (all tables), info (table details), create (new table), drop (remove table), add_column (add column), drop_column (remove column), rename (rename table)", "enum": [ "list", "info", "create", "drop", "add_column", "drop_column", "rename" ], "type": "string" }, "columnName": { "description": "Column name (required for add_column, drop_column)", "type": "string" }, "columns": { "description": "Column definitions for create action", "items": { "properties": { "defaultValue": { "type": "string" }, "name": { "type": "string" }, "nullable": { "default": true, "type": "boolean" }, "primaryKey": { "default": false, "type": "boolean" }, "type": { "type": "string" } }, "required": [ "name", "type" ], "type": "object" }, "type": "array" }, "dataType": { "description": "Data type (required for add_column)", "type": "string" }, "newName": { "description": "New name (required for rename action)", "type": "string" }, "options": { "description": "Action-specific options", "properties": { "cascade": { "default": false, "type": "boolean" }, "ifExists": { "default": true, "type": "boolean" }, "ifNotExists": { "default": false, "type": "boolean" }, "includeSystemTables": { "default": false, "type": "boolean" }, "includeViews": { "default": false, "type": "boolean" }, "temporary": { "default": false, "type": "boolean" } }, "type": "object" }, "schemaName": { "default": "public", "description": "Schema name (default: public)", "type": "string" }, "tableName": { "description": "Table name (required for info, create, drop, add_column, drop_column, rename)", "type": "string" } }, "required": [ "action" ], "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