UNPKG

mcp-postgres-full-access-extended

Version:

Full-access PostgreSQL server for Model Context Protocol with read/write capabilities and enhanced schema metadata

73 lines (72 loc) 2.04 kB
export declare function handleExecuteRollback(transactionManager: TransactionManager, transactionId: string): Promise<{ content: { type: string; text: string; }[]; isError: boolean; }>; import pg from "pg"; import { TransactionManager } from "./transaction-manager.js"; export declare function handleExecuteQuery(pool: pg.Pool, sql: string): Promise<{ content: { type: string; text: string; }[]; isError: boolean; }>; export declare function handleExecuteDML(pool: pg.Pool, transactionManager: TransactionManager, sql: string, transactionTimeoutMs: number): Promise<{ content: { type: string; text: string; }[]; isError: boolean; }>; export declare function handleExecuteMaintenance(pool: pg.Pool, sql: string): Promise<{ content: { type: string; text: string; }[]; isError: boolean; }>; export declare function handleExecuteCommit(transactionManager: TransactionManager, transactionId: string): Promise<{ content: { type: string; text: string; }[]; isError: boolean; }>; export declare function handleListTables(pool: pg.Pool, schemaName?: string): Promise<{ content: { type: string; text: string; }[]; isError: boolean; }>; export declare function handleListSchemas(pool: pg.Pool): Promise<{ content: { type: string; text: string; }[]; isError: boolean; }>; export declare function handleDescribeTable(pool: pg.Pool, tableName: string, schemaName?: string): Promise<{ content: { type: string; text: string; }[]; isError: boolean; }>; export declare function handleListResources(pool: pg.Pool, resourceBaseUrl: URL): Promise<{ resources: { uri: string; mimeType: string; name: string; }[]; }>; export declare function handleReadResource(pool: pg.Pool, resourceUri: string): Promise<{ contents: { uri: string; mimeType: string; text: string; }[]; }>;