@neverinfamous/postgres-mcp 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +28 -157
  2. package/dist/adapters/DatabaseAdapter.d.ts.map +1 -1
  3. package/dist/adapters/DatabaseAdapter.js +11 -15
  4. package/dist/adapters/DatabaseAdapter.js.map +1 -1
  5. package/dist/adapters/postgresql/resources/capabilities.js +1 -1
  6. package/dist/adapters/postgresql/resources/cron.d.ts.map +1 -1
  7. package/dist/adapters/postgresql/resources/cron.js +2 -1
  8. package/dist/adapters/postgresql/resources/cron.js.map +1 -1
  9. package/dist/adapters/postgresql/schemas/core/transactions.d.ts +12 -0
  10. package/dist/adapters/postgresql/schemas/core/transactions.d.ts.map +1 -1
  11. package/dist/adapters/postgresql/schemas/core/transactions.js +18 -0
  12. package/dist/adapters/postgresql/schemas/core/transactions.js.map +1 -1
  13. package/dist/adapters/postgresql/schemas/index.d.ts +1 -1
  14. package/dist/adapters/postgresql/schemas/index.d.ts.map +1 -1
  15. package/dist/adapters/postgresql/schemas/index.js +1 -1
  16. package/dist/adapters/postgresql/schemas/index.js.map +1 -1
  17. package/dist/adapters/postgresql/schemas/introspection.d.ts +3 -0
  18. package/dist/adapters/postgresql/schemas/introspection.d.ts.map +1 -1
  19. package/dist/adapters/postgresql/schemas/introspection.js +3 -2
  20. package/dist/adapters/postgresql/schemas/introspection.js.map +1 -1
  21. package/dist/adapters/postgresql/schemas/partman.d.ts +1 -1
  22. package/dist/adapters/postgresql/tools/introspection/analysis.d.ts.map +1 -1
  23. package/dist/adapters/postgresql/tools/introspection/analysis.js +13 -12
  24. package/dist/adapters/postgresql/tools/introspection/analysis.js.map +1 -1
  25. package/dist/adapters/postgresql/tools/introspection/graph.d.ts +16 -0
  26. package/dist/adapters/postgresql/tools/introspection/graph.d.ts.map +1 -1
  27. package/dist/adapters/postgresql/tools/introspection/graph.js +43 -21
  28. package/dist/adapters/postgresql/tools/introspection/graph.js.map +1 -1
  29. package/dist/adapters/postgresql/tools/introspection/migration.d.ts.map +1 -1
  30. package/dist/adapters/postgresql/tools/introspection/migration.js +13 -10
  31. package/dist/adapters/postgresql/tools/introspection/migration.js.map +1 -1
  32. package/dist/adapters/postgresql/tools/performance/anomaly-detection.d.ts.map +1 -1
  33. package/dist/adapters/postgresql/tools/performance/anomaly-detection.js +20 -7
  34. package/dist/adapters/postgresql/tools/performance/anomaly-detection.js.map +1 -1
  35. package/dist/adapters/postgresql/tools/performance/diagnostics.d.ts.map +1 -1
  36. package/dist/adapters/postgresql/tools/performance/diagnostics.js +17 -7
  37. package/dist/adapters/postgresql/tools/performance/diagnostics.js.map +1 -1
  38. package/dist/adapters/postgresql/tools/transactions.d.ts.map +1 -1
  39. package/dist/adapters/postgresql/tools/transactions.js +67 -2
  40. package/dist/adapters/postgresql/tools/transactions.js.map +1 -1
  41. package/dist/codemode/api/aliases.d.ts.map +1 -1
  42. package/dist/codemode/api/aliases.js +5 -0
  43. package/dist/codemode/api/aliases.js.map +1 -1
  44. package/dist/codemode/api/maps.d.ts.map +1 -1
  45. package/dist/codemode/api/maps.js +3 -0
  46. package/dist/codemode/api/maps.js.map +1 -1
  47. package/dist/constants/ServerInstructions.d.ts +1 -1
  48. package/dist/constants/ServerInstructions.d.ts.map +1 -1
  49. package/dist/constants/ServerInstructions.js +16 -9
  50. package/dist/constants/ServerInstructions.js.map +1 -1
  51. package/dist/filtering/ToolConstants.d.ts +13 -13
  52. package/dist/filtering/ToolConstants.d.ts.map +1 -1
  53. package/dist/filtering/ToolConstants.js +23 -22
  54. package/dist/filtering/ToolConstants.js.map +1 -1
  55. package/dist/utils/fts-config.d.ts +6 -0
  56. package/dist/utils/fts-config.d.ts.map +1 -1
  57. package/dist/utils/fts-config.js +1 -1
  58. package/dist/utils/fts-config.js.map +1 -1
  59. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"aliases.js","sourceRoot":"","sources":["../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D,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE;IAC1E,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE;IACtE,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE;IACtE;QACE,KAAK,EAAE,MAAM;QACb,WAAW,EAAE,mBAAmB;QAChC,UAAU,EAAE,eAAe;KAC5B;IACD;QACE,KAAK,EAAE,MAAM;QACb,WAAW,EAAE,oBAAoB;QACjC,UAAU,EAAE,gBAAgB;KAC7B;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"maps.d.ts","sourceRoot":"","sources":["../../../src/codemode/api/maps.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA4NjE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CA8InD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAoHlE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAMjD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAClC,MAAM,EACN;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAUxC,CAAC"}
1
+ {"version":3,"file":"maps.d.ts","sourceRoot":"","sources":["../../../src/codemode/api/maps.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA6NjE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CA8InD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAsHlE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAMjD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAClC,MAAM,EACN;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAUxC,CAAC"}
@@ -115,6 +115,7 @@ export const METHOD_ALIASES = {
115
115
  release: "transactionRelease",
116
116
  rollbackTo: "transactionRollbackTo",
117
117
  execute: "transactionExecute",
118
+ status: "transactionStatus",
118
119
  },
119
120
  // Stats: pg_stats_descriptive → descriptive, but agent might try statsDescriptive
120
121
  stats: {
@@ -443,6 +444,7 @@ export const POSITIONAL_PARAM_MAP = {
443
444
  // ============ TRANSACTION GROUP ============
444
445
  transactionCommit: "transactionId",
445
446
  transactionRollback: "transactionId",
447
+ transactionStatus: "transactionId",
446
448
  transactionSavepoint: ["transactionId", "name"],
447
449
  transactionRelease: ["transactionId", "name"],
448
450
  transactionRollbackTo: ["transactionId", "name"],
@@ -450,6 +452,7 @@ export const POSITIONAL_PARAM_MAP = {
450
452
  // Short aliases
451
453
  commit: "transactionId",
452
454
  rollback: "transactionId",
455
+ status: "transactionId",
453
456
  savepoint: ["transactionId", "name"],
454
457
  release: ["transactionId", "name"],
455
458
  rollbackTo: ["transactionId", "name"],
@@ -1 +1 @@
1
- {"version":3,"file":"maps.js","sourceRoot":"","sources":["../../../src/codemode/api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,OAAO;IAClB,UAAU,EAAE,QAAQ;IACpB,cAAc,EAAE,YAAY;IAC5B,QAAQ,EAAE,WAAW;IACrB,eAAe,EAAE,YAAY;IAE7B,uCAAuC;IACvC,YAAY;IACZ,QAAQ,EAAE,MAAM;IAChB,OAAO,EAAE,MAAM;IACf,YAAY,EAAE,MAAM;IACpB,WAAW,EAAE,MAAM;IACnB,wDAAwD;IACxD,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC;IACrC,SAAS,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC;CACxC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAA2B;IACpD,kBAAkB,EAAE,YAAY;IAChC,OAAO,EAAE,YAAY;IACrB,wDAAwD;IACxD,KAAK,EAAE,QAAQ;IACf,UAAU,EAAE,QAAQ;CACrB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAAe,GAGxB;IACF,MAAM,EAAE;QACN,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;KACtC,EAAE,mDAAmD;IACtD,WAAW,EAAE;QACX,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;KACtC,EAAE,QAAQ;CACZ,CAAC"}
@@ -13,5 +13,5 @@
13
13
  * - Removed redundant alias documentation (already in tool schemas)
14
14
  * - Semantic tagging for high-signal guidance
15
15
  */
16
- export declare const SERVER_INSTRUCTIONS = "# postgres-mcp Code Mode\n\n## \u26A0\uFE0F Critical Gotchas\n\n1. **Transactions**: `pg.transactions.execute({statements: [{sql: \"...\"}]})` auto-commits on success, auto-rollbacks on error. To join existing transaction: `{transactionId: txId, statements: [...]}` (no auto-commit, caller controls)\n2. **pg_write_query**: \u26D4 Throws for SELECT\u2014use `pg_read_query` for SELECT statements\n3. **pg_upsert/pg_create_table**: `schema.table` format auto-parses (e.g., `'myschema.users'` \u2192 schema: 'myschema', table: 'users')\n4. **pg_create_table columns**: `notNull`, `defaultValue` (string literals auto-quoted; numbers/booleans auto-coerced; `now()` \u2192 `CURRENT_TIMESTAMP`), `check`, `references` (object or string `\"table(column)\"` syntax)\n5. **pg_create_table constraints**: `constraints` array only accepts `{type: 'unique'|'check'}`. Primary keys: use `column.primaryKey` or top-level `primaryKey: ['col1', 'col2']`\n6. **pg_create_index expression**: Columns can be expressions like `LOWER(name)` or `UPPER(email)`\u2014auto-detected. \u26A0\uFE0F Cast syntax (`::`) requires raw SQL via `pg_write_query`\n7. **pg_list_objects type**: Use `type` (singular string) or `types` (array). Auto-converts: `{type: 'table'}` \u2261 `{types: ['table']}`\n8. **pg_object_details**: Accepts: `name`, `objectName`, `object`, or `table`. Use `type`/`objectType` for type hint (supports: table, view, materialized_view, partitioned_table, function, sequence, index)\n9. **pg_exists optional WHERE**: `where`/`condition`/`filter` is optional. Without it, checks if table has any rows\n10. **pg_describe_table**: Returns columns, foreignKeys, primaryKey, indexes, constraints. For listing ALL database indexes (not table-specific), use `pg_get_indexes` without `table` param\n11. **pg_vector_insert updateExisting**: Uses direct UPDATE (avoids NOT NULL constraint issues vs INSERT mode)\n12. **pg_get_indexes without table**: Returns ALL database indexes (potentially large). Use `table` param for specific table\n13. **pg_upsert/pg_batch_insert RETURNING**: `returning` param must be array of column names: `[\"id\", \"name\"]`. \u26D4 `\"*\"` wildcard not supported\n14. **Small tables**: Optimizer correctly uses Seq Scan for <1000 rows\u2014this is expected behavior\n\n## \uD83D\uDD04 Response Structures\n\n| Tool | Returns | Notes |\n| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------- | ---------------------------------------------------------------------------------------- |\n| `pg_read_query` | `{rows, rowCount, fields?}` | `fields` contains column metadata (name, dataTypeID) |\n| `pg_write_query` | `{rowsAffected, affectedRows, rows?}` | `rows` only with RETURNING clause. DDL statements return `rowsAffected: 0`. \u26D4 Throws for SELECT |\n| `pg_upsert` | `{success, operation, rowsAffected, rowCount, rows?}` | `operation: 'insert' | 'update'`. `rows` only with RETURNING clause |\n| `pg_batch_insert` | `{success, rowsAffected, affectedRows, insertedCount, rowCount, rows?}` | Empty objects use DEFAULT VALUES. \u26A0\uFE0F BIGINT > 2^53 loses precision |\n| `pg_create_table` | `{success, table, sql, compositePrimaryKey?}` | `table` = schema-qualified name. `compositePrimaryKey` only when composite PK used |\n| `pg_drop_table` | `{success, dropped, existed}` | `existed` indicates whether table was present before drop |\n| `pg_create_index` | `{success, index, indexName, table, sql, ifNotExists?, alreadyExists?, message?}` | `alreadyExists`/`message` only with `ifNotExists: true` when index pre-exists |\n| `pg_drop_index` | `{success, index, existed, sql}` | `existed` indicates whether index was present before drop |\n| `pg_truncate` | `{success, table, cascade, restartIdentity}` | `cascade`/`restartIdentity` reflect the options used |\n| `pg_count` | `{count: N}` | Use `params` for placeholders: `where: 'id=$1', params: [5]`. DISTINCT: use `pg_read_query` |\n| `pg_exists` | `{exists: bool, mode, hint?}` | `params` for placeholders. `mode: 'filtered' | 'any_rows'` |\n| `pg_get_indexes` | `{indexes, count, totalCount?}` | Default `limit: 100` without `table`. Use `schema`/`limit` to filter. Index objects have `name`, `type`, `columns` |\n| `pg_list_objects` | `{objects, count, totalCount, byType}` | Use `limit` to cap results, `type`/`types` to filter |\n| `pg_object_details` | `{name, schema, type, returnType?, ...}` | Functions: `returnType` alias. Views/Mat. views: `definition`. Tables: equivalent to `pg_describe_table` (columns, primaryKey, indexes, constraints, foreignKeys) |\n| `pg_analyze_db_health` | `{cacheHitRatio, databaseSize, tableStats, unusedIndexes, tablesNeedingVacuum, connections, bloat, isReplica, overallScore, overallStatus}` | `cacheHitRatio`: `{ratio, heap, index, status}`. `overallStatus`: `healthy | needs_attention | critical`. Optional sections via `includeIndexes`, `includeVacuum`, `includeConnections` |\n| `pg_describe_table` | `{name, schema, type, owner, rowCount, columns, primaryKey, indexes, constraints, foreignKeys}` | Columns include `notNull` (alias for `!nullable`), `foreignKey`. `constraints` includes PK, UNIQUE, CHECK, NOT NULL. \u26A0\uFE0F `rowCount: -1` = stale/missing statistics (run ANALYZE on the table). Small tables (<~50 rows) may show -1 until first ANALYZE |\n| `pg_analyze_query_indexes` | `{plan, issues, recommendations}` | `verbosity`: 'summary' (default) or 'full'. Summary mode returns condensed plan |\n| `pg_list_tables` | `{tables, count, totalCount, truncated?, hint?}` | Use `schema` to filter, `limit` to cap results, `exclude` to hide extension schemas (e.g., `['cron', 'topology', 'partman']`) |\n| List operations | `{items, count}` | Access via `result.tables`, `result.views`, etc. |\n| `pg_jsonb_agg groupBy` | `{result: [{group_key, items}], count, grouped: true}` | Without groupBy: `{result: [...], count, grouped: false}` |\n| `pg_vector_aggregate` | `{average_vector, count}` or `{groups: [{group_key, average_vector, count}]}` | Without/with `groupBy` |\n| `pg_index_stats` | `{indexes, count, truncated?, totalCount?}` | Default 50 rows. Use `limit: 0` for all |\n| `pg_table_stats` | `{tables, count, truncated?, totalCount?}` | Default 50 rows. Use `limit: 0` for all |\n| `pg_vacuum_stats` | `{tables, count, truncated?, totalCount?}` | Default 50 rows. Use `limit: 0` for all |\n| `pg_stat_statements` | `{statements, count, truncated?, totalCount?}` | Default 20 rows. `orderBy` supported |\n| `pg_query_plan_stats` | `{queryPlanStats, count, truncated?, totalCount?}` | Default 20 rows. `truncateQuery: 0` for full text |\n| `pg_stat_activity` | `{connections, count, backgroundWorkers}` | `includeIdle: true` to include idle connections. `backgroundWorkers` = count of background worker processes |\n| `pg_locks` | `{locks}` | `showBlocked: true` switches to blocked/blocking pid format |\n| `pg_bloat_check` | `{tables, count}` | Tables with `live_tuples`, `dead_tuples`, `dead_pct` |\n| `pg_cache_hit_ratio` | `{heap_read, heap_hit, cache_hit_ratio}` | All fields nullable (0 tables = null). Flat response, differs from `pg_analyze_db_health.cacheHitRatio` |\n| `pg_seq_scan_tables` | `{tables, count, minScans, hint, truncated?, totalCount?}` | Default 50 rows. `minScans` default: 10 |\n| `pg_connection_pool_optimize` | `{current, config, waitEvents, recommendations}` | No params needed |\n| `pg_performance_baseline` | `{name, timestamp, metrics}` | `metrics`: `cache`, `tables`, `indexes`, `connections`, `databaseSize` |\n| `pg_duplicate_indexes` | `{duplicateIndexes, count, hint, truncated?, totalCount?}` | Default 50 rows. `duplicate_type`: EXACT_DUPLICATE, OVERLAPPING, SUBSET |\n| `pg_query_plan_compare` | `{query1, query2, analysis, fullPlans}` | `analysis.costDifference` + `recommendation` |\n| `pg_unused_indexes` | `{unusedIndexes, count, hint, truncated?, totalCount?}` | Default 20 rows. `summary: true` \u2192 `{summary, bySchema, totalCount}` |\n\n## API Mapping\n\n`pg_group_action` \u2192 `pg.group.action()` (group prefixes dropped: `pg_jsonb_extract` \u2192 `pg.jsonb.extract()`)\n\n**Top-Level Core Aliases**: All starter tools available directly: `pg.readQuery()`, `pg.writeQuery()`, `pg.listTables()`, `pg.describeTable()`, `pg.createTable()`, `pg.dropTable()`, `pg.count()`, `pg.exists()`, `pg.upsert()`, `pg.batchInsert()`, `pg.truncate()`, `pg.createIndex()`, `pg.dropIndex()`, `pg.getIndexes()`, `pg.listObjects()`, `pg.objectDetails()`, `pg.listExtensions()`, `pg.analyzeDbHealth()`, `pg.analyzeQueryIndexes()`, `pg.analyzeWorkloadIndexes()`\n\n**Positional args work**: `readQuery(\"SELECT...\")`, `exists(\"users\", \"id=1\")`, `createIndex(\"users\", [\"email\"])`\n\n**Discovery**: `pg.help()` returns `{group: methods[]}` mapping (e.g., `{core: ['readQuery', ...], jsonb: [...]}`). `pg.core.help()`, `pg.jsonb.help()` for group-specific methods.\n\n## Format Auto-Resolution\n\n- **Schema.Table**: `'public.users'` auto-parses to `{schema: 'public', table: 'users'}`\n- **JSONB Paths**: Both `'a.b.c'` (string) and `['a','b','c']` (array) work. Use array for literal dots: `[\"key.with.dots\"]`\n- **Aliases**: Common parameter variations resolve automatically (e.g., `query`/`sql`, `table`/`tableName`)\n\n---\n\n## Vector Tools\n\n\u26A0\uFE0F **Large Vectors**: Direct MCP tool calls may truncate vectors >256 dimensions due to JSON-RPC message size limits. For vectors \u2265256 dimensions (e.g., OpenAI 1536-dim, local 384-dim), use Code Mode: `await pg.vector.search({table, column, vector, limit})`\n\n- `pg_vector_search`: Supports `schema.table` format (auto-parsed). Returns `{results: [...], count, metric}`. Use `select: [\"id\", \"name\"]` to include identifying columns. Without select, only returns distance. `filter` = `where`. \u26A0\uFE0F Vectors read from DB are strings\u2014parse before passing: `vec.replace(/^\\[|\\]$/g, '').split(',').map(Number)`\n- `pg_vector_insert`: Supports `schema.table` format (auto-parsed). Use `updateExisting` + `conflictColumn` + `conflictValue` for UPDATE mode. `additionalColumns` is applied in both INSERT and UPDATE modes\n- `pg_vector_batch_insert`: `vectors` expects `[{vector: [...], data?: {...}}]` objects, not raw arrays\n- `pg_vector_normalize`: Returns `{normalized: [...], magnitude: N}`. Note: `magnitude` is the **original** vector length (not 1)\n- `pg_vector_aggregate`: Supports `schema.table` format (auto-parsed). \u26D4 Validates column is vector type. Returns `{average_vector: {preview, dimensions, truncated}, count}` or `{groups: [{group_key, average_vector, count}]}` with groupBy. \u26A0\uFE0F `groupBy` only supports simple column names (not expressions)\n- `pg_vector_dimension_reduce`: Direct mode returns `{reduced: [...], originalDimensions, targetDimensions}`. Table mode returns `{rows: [{id, original_dimensions, reduced}], processedCount, summarized}`. Default `summarize: true` in table mode returns compact `{preview, dimensions, truncated}` format. Use `summarize: false` for full vectors\n- `pg_vector_distance`: Calculate distance between two vectors. `metric`: 'l2' (default), 'cosine', 'inner_product'. Returns `{distance, metric}`\n- `pg_vector_cluster`: `clusters` = `k`. Returns centroids with `{preview, dimensions, truncated}` format for large vectors (>10 dims)\u2014use `pg_vector_distance` to assign rows\n- `pg_vector_create_index`: Use `type` (or alias `method`) with values 'ivfflat' or 'hnsw'. IVFFlat: `lists` param. HNSW: `m`, `efConstruction` params\n- `pg_vector_performance`: Auto-generates testVector from first row if omitted. Returns `testVectorSource: 'auto-generated from first row'|'user-provided'`\n- `pg_vector_validate`: Returns `{valid: bool, vectorDimensions}`. Empty vector `[]` returns `{valid: true, vectorDimensions: 0}`\n- \u26D4 `pg_vector_embed`: Demo only (hash-based). Use OpenAI/Cohere for production.\n- `pg_hybrid_search`: Supports `schema.table` format (auto-parsed). Combines vector similarity and full-text search with weighted scoring. `textColumn` auto-detects type: uses tsvector columns directly, wraps text columns with `to_tsvector()`. Code mode alias: `pg.hybridSearch()` \u2192 `pg.vector.hybridSearch()`\n- \uD83D\uDCDD **Error Handling**: Vector tools return `{success: false, error: \"...\", suggestion: \"...\"}` for validation/semantic errors (dimension mismatch, non-vector column, table not found). Check `success` field before processing results.\n\n## JSONB Tools\n\n- `pg_jsonb_extract`: Returns null if path doesn't exist\n- `pg_jsonb_insert`: Index -1 inserts BEFORE last element; use `insertAfter: true` to append. \u26A0\uFE0F Use array format `[-1]` not string `\"[-1]\"` for negative indices\n- `pg_jsonb_set`: `createMissing=true` creates full nested paths; initializes NULL columns to `{}`. Empty path (`''` or `[]`) replaces entire column value\n- `pg_jsonb_strip_nulls`: \u26A0\uFE0F Requires `where`/`filter` clause\u2014write operations must be targeted. Use `preview: true` to see changes first\n- `pg_jsonb_agg`: Supports AS aliases in select: `[\"id\", \"metadata->>'name' AS name\"]`. \u26A0\uFE0F `->>` returns text\u2014use `->` to preserve JSON types\n- `pg_jsonb_object`: Use `data`, `object`, or `pairs` parameter: `{data: {name: \"John\", age: 30}}`. Returns `{object: {...}}`\n- `pg_jsonb_normalize`: `flatten` doesn't descend into arrays; `keys` returns text (use `pairs` for JSON types)\n- `pg_jsonb_stats`: Returns column-level statistics. `topKeysLimit` controls key count (default: 20). \u26A0\uFE0F `typeDistribution` null type = SQL NULL columns (entire column NULL, not JSON `null` literal). Use `sqlNullCount` for explicit count\n- \u26D4 **Object-only tools**: `diff`, `merge`, `keys`, `indexSuggest`, `securityScan`, `stats`\u2014topKeys require JSONB objects, throw descriptive errors for arrays\n- \u26D4 **Array-only tools**: `insert`\u2014requires JSONB arrays, throws errors for objects\n- \uD83D\uDCDD `normalize` modes: `pairs`/`keys`/`flatten` for objects; `array` for arrays\n- \uD83D\uDCE6 **AI-Optimized Payloads**: `contains` and `pathQuery` default to 100 results. Returns `truncated` + `totalCount` when capped. Use `limit: 0` for all rows\n\n**Top-Level Aliases**: `pg.jsonbExtract()`, `pg.jsonbSet()`, `pg.jsonbInsert()`, `pg.jsonbDelete()`, `pg.jsonbContains()`, `pg.jsonbPathQuery()`, `pg.jsonbAgg()`, `pg.jsonbObject()`, `pg.jsonbArray()`, `pg.jsonbKeys()`, `pg.jsonbStripNulls()`, `pg.jsonbTypeof()`, `pg.jsonbValidatePath()`, `pg.jsonbMerge()`, `pg.jsonbNormalize()`, `pg.jsonbDiff()`, `pg.jsonbIndexSuggest()`, `pg.jsonbSecurityScan()`, `pg.jsonbStats()`\n\n## Stats Tools\n\n- All stats tools support `schema.table` format (auto-parsed, embedded schema takes priority over explicit `schema` param)\n- `timeSeries`: Both `timeColumn` (must be timestamp/date) and `valueColumn` (must be numeric) are validated upfront with clear error messages. Aliases: `time`\u2192`timeColumn`, `value`\u2192`valueColumn`. `interval` accepts: `second`, `minute`, `hour`, `day`, `week`, `month`, `year` (keywords, PostgreSQL format, or plurals). Default `limit: 100` time buckets. Use `limit: 0` for no limit. Returns `truncated` and `totalCount` indicators when default limit is applied. **groupBy payloads**: Default `groupLimit: 20` groups. Returns `truncated` + `totalGroupCount` when groups are limited. Use `groupLimit: 0` for all groups\n- `correlation`: Use `column1`/`column2` or aliases `x`/`y` for column names\n- `distribution`: Returns `skewness`, `kurtosis` (excess). `buckets` must be > 0. **groupBy payloads**: Default `groupLimit: 20` groups (prevents large payloads with many histogram buckets per group). Returns `truncated` + `totalGroupCount` when groups are limited. Use `groupLimit: 0` for all groups\n- `sampling`: Defaults to `random` method with 20 rows (optimized for LLM context). `sampleSize` always takes precedence over `percentage`. \u26A0\uFE0F `percentage` param only works with `bernoulli`/`system` methods\u2014ignored for default `random` method. Default limit of 100 rows applied to `bernoulli`/`system` with `percentage` to prevent large payloads. Returns `truncated` and `totalSampled` when TABLESAMPLE returns more rows than limit\n- `percentiles`: Accepts 0-1 or 0-100 (auto-normalized). \u26A0\uFE0F Use consistent scale\u2014mixing (e.g., `[0.1, 50]`) produces unexpected keys and returns a `warning` field explaining the issue. Empty array \u2192 defaults [0.25, 0.5, 0.75]\n- `hypothesis`: Returns nested `results` object containing `pValue` (two-tailed), `testStatistic`, `interpretation`, `sampleMean`, `sampleStdDev`. Access via `hyp.results.pValue`. Use `populationStdDev` for z-test, otherwise defaults to t-test\n- `regression`: Use `xColumn`/`yColumn`, aliases `x`/`y`, or `column1`/`column2` (for consistency with correlation). Returns nested `regression` object containing `slope`, `intercept`, `rSquared`, `equation`, `avgX`, `avgY`, `sampleSize`. Access via `reg.regression.slope`\n- \u26A0\uFE0F WARNING: `sampling` with `system` method unreliable for small tables\u2014use `bernoulli` or `random`\n\n**Top-Level Aliases**: `pg.descriptive()`, `pg.percentiles()`, `pg.correlation()`, `pg.regression()`, `pg.timeSeries()`, `pg.distribution()`, `pg.hypothesis()`, `pg.sampling()`\n\n## Text Tools\n\n- `pg_text_search`/`pg_text_rank`: Column must be `text` type\u2014pre-built `tsvector` columns are **not** supported (wrap with `to_tsvector()` fails on tsvector input). Use `pg_read_query` with raw FTS SQL for tsvector columns\n- `pg_create_fts_index`: Returns `{success, index, config, skipped}`. `skipped: true` = index already existed (IF NOT EXISTS). `ifNotExists` defaults to `true`\n\n## Performance Tools\n\nCore (20 methods): `explain()`, `explainAnalyze()`, `explainBuffers()`, `indexStats()`, `tableStats()`, `statStatements()`, `statActivity()`, `locks()`, `bloatCheck()`, `cacheHitRatio()`, `seqScanTables()`, `indexRecommendations()`, `queryPlanCompare()`, `baseline()`, `connectionPoolOptimize()`, `partitionStrategySuggest()`, `unusedIndexes()`, `duplicateIndexes()`, `vacuumStats()`, `queryPlanStats()`\n\nWrappers (3): `blockingQueries()`\u2192`locks({showBlocked:true})`, `longRunningQueries({ seconds | minDuration }?)` filters by duration (returns `{longRunningQueries, count, threshold}`), `analyzeTable({ table })` runs ANALYZE (accepts `schema.table` format)\n\n- `explain({ sql, format?, params? })`: Supports `format: 'text'|'json'|'yaml'|'xml'`. Default: text. Use `params: [value]` for `$1, $2` placeholders\n- `explainAnalyze({ sql, format?, params? })`: Same format/params options as explain\n- `explainBuffers({ sql, params? })`: Always returns JSON format (includes buffer statistics)\n- `indexRecommendations({ sql?, params? })`: Pass `params: [value]` for parameterized queries (e.g., `sql: 'SELECT * FROM orders WHERE id = $1', params: [5]`)\n- `queryPlanCompare({ query1, query2, params1?, params2? })`: Compare two query plans. Use `params1`/`params2` for parameterized queries\n- `partitionStrategySuggest({ table })`: Accepts `schema.table` format (auto-parsed) or separate `table` + `schema` params\n- \u26A0\uFE0F **Data Type Awareness**: Query literals must match column types exactly\u2014`WHERE sensor_id = 1` (integer), not `'sensor_1'` (string)\n\nAliases: `cacheStats`\u2192`cacheHitRatio`, `queryStats`\u2192`statStatements`, `activity`\u2192`statActivity`, `vacuum`\u2192`vacuumStats`, `indexUsage`\u2192`indexStats`, `bloatEstimate`/`bloat`\u2192`bloatCheck`, `runningQueries`\u2192`longRunningQueries`\n\n\uD83D\uDCE6 **AI-Optimized Payloads**: Tools return limited results by default to reduce context size:\n\n- `indexStats({ limit? })`: Default 50 rows. Returns `truncated: true` + `totalCount` when limited. Use `limit: 0` for all\n- `tableStats({ limit? })`: Default 50 rows. Returns `truncated: true` + `totalCount` when limited. Use `limit: 0` for all\n- `vacuumStats({ limit? })`: Default 50 rows. Same truncation indicators. Use `limit: 0` for all\n- `statStatements({ limit?, orderBy? })`: Default 20 rows. Returns `truncated: true` + `totalCount` when limited. Use `limit: 0` for all\n- `unusedIndexes({ limit?, summary? })`: Default 20 rows. Use `summary: true` for aggregated stats by schema\n- `queryPlanStats({ limit?, truncateQuery? })`: Default 20 rows, queries truncated to 100 chars. Use `truncateQuery: 0` for full text\n\n\uD83D\uDCCD **Code Mode Note**: `pg_performance_baseline` \u2192 `pg.performance.baseline()` (not `performanceBaseline`). `indexRecommendations` accepts `query` alias for `sql`\n\n**Top-Level Aliases**: `pg.explain()`, `pg.explainAnalyze()`, `pg.cacheHitRatio()`, `pg.indexStats()`, `pg.tableStats()`, `pg.indexRecommendations()`, `pg.bloatCheck()`, `pg.vacuumStats()`, `pg.unusedIndexes()`, `pg.duplicateIndexes()`, `pg.seqScanTables()`\n\n## Monitoring Tools\n\nCore: `databaseSize()`, `tableSizes()`, `connectionStats()`, `showSettings()`, `capacityPlanning()`, `uptime()`, `serverVersion()`, `recoveryStatus()`, `replicationStatus()`, `resourceUsageAnalyze()`, `alertThresholdSet()`\n\n- `databaseSize()`: Returns `{bytes: number, size: string}`. Optional `database` param for specific db\n- `tableSizes({ limit?, schema? })`: Default limit 50. Returns `{tables: [...], count, truncated?, totalCount?}`. `truncated: true` + `totalCount` when limited. Use `limit: 0` for all\n- `connectionStats()`: Returns `{byDatabaseAndState, totalConnections: number, maxConnections: number}`\n- `showSettings({ setting?, limit? })`: Default limit 50 when no pattern. Returns `{settings: [...], count, truncated?, totalCount?}`. Accepts `pattern`, `setting`, or `name`. Exact names auto-match; `%` for LIKE patterns\n- `capacityPlanning({days: 90})`: `days` = `projectionDays`. Returns `{current, growth, projection, recommendations}` with numeric fields. \u26D4 Negative days rejected\n- `uptime()`: Returns `{start_time: string, uptime: {days, hours, minutes, seconds, milliseconds}}`\n- `serverVersion()`: Returns `{full_version: string, version: string, version_num: number}`\n- `recoveryStatus()`: Returns `{in_recovery: boolean, last_replay_timestamp: string|null}`\n- `replicationStatus()`: Returns `{role: 'primary'|'replica', replicas: [...]}` for primary, or `{role: 'replica', replay_lag, ...}` for replica\n- `resourceUsageAnalyze()`: Returns `{backgroundWriter, checkpoints, connectionDistribution, bufferUsage, activity, analysis}` with all counts as numbers\n- `alertThresholdSet({metric?: 'connection_usage'})`: Returns recommended thresholds. Invalid metric returns `{success: false, error: \"...\"}`. Valid metrics: connection_usage, cache_hit_ratio, replication_lag, dead_tuples, long_running_queries, lock_wait_time\n\n\uD83D\uDCE6 **AI-Optimized Payloads**: Tools return limited results by default to reduce context size:\n\n- `tableSizes({ limit? })`: Default 50 rows. Returns `truncated: true` + `totalCount` when limited. Use `limit: 0` for all\n- `showSettings({ limit? })`: Default 50 rows when no pattern specified. Use `limit: 0` for all or specify a pattern\n\nAliases: `tables`\u2192`tableSizes`, `connections`\u2192`connectionStats`, `settings`/`config`\u2192`showSettings`, `alerts`/`thresholds`\u2192`alertThresholdSet`\n\n**Top-Level Aliases**: `pg.databaseSize()`, `pg.tableSizes()`, `pg.connectionStats()`, `pg.serverVersion()`, `pg.uptime()`, `pg.showSettings()`, `pg.recoveryStatus()`, `pg.replicationStatus()`, `pg.capacityPlanning()`, `pg.resourceUsageAnalyze()`, `pg.alertThresholdSet()`\n\n## Admin Tools\n\nCore: `vacuum()`, `vacuumAnalyze()`, `analyze()`, `reindex()`, `cluster()`, `setConfig()`, `reloadConf()`, `resetStats()`, `cancelBackend()`, `terminateBackend()`\n\n- All admin tools support `schema.table` format (auto-parsed, embedded schema takes priority over explicit `schema` param)\n- `vacuum({ table?, full?, analyze?, verbose? })`: Without `table`, vacuums ALL tables. `verbose` output goes to PostgreSQL server logs\n- `reindex({ target, name?, concurrently? })`: Targets: 'table', 'index', 'schema', 'database'. `database` target defaults to current db when `name` omitted\n- `cluster()`: Without args, re-clusters all previously-clustered tables. With args, requires BOTH `table` AND `index`\n- `setConfig({ name, value, isLocal? })`: `isLocal: true` applies only to current transaction\n- `cancelBackend({ pid })`: Graceful query cancellation\u2014returns `{success: false}` for invalid PID (no error thrown)\n- `terminateBackend({ pid })`: Forceful connection termination\u2014use with caution\n\nAliases: `tableName`\u2192`table`, `indexName`\u2192`index`, `param`/`setting`\u2192`name`, `processId`\u2192`pid`\n\n**Top-Level Aliases**: `pg.vacuum()`, `pg.vacuumAnalyze()`, `pg.analyze()`, `pg.reindex()`, `pg.cluster()`, `pg.setConfig()`, `pg.reloadConf()`, `pg.resetStats()`, `pg.cancelBackend()`, `pg.terminateBackend()`\n\n**Discovery**: `pg.admin.help()` returns `{methods, methodAliases, examples}` object\n\n**Response structures**:\n\n- `vacuum()` / `vacuumAnalyze()`: `{success, message, table?, schema?, hint?}` (hint present when verbose: true)\n- `analyze()`: `{success, message, table?, schema?, columns?}`\n- `reindex()`: `{success, message}`\n- `cluster()`: `{success, message, table?, index?}` (table/index present for table-specific cluster)\n- `setConfig()`: `{success, message, parameter, value}`\n- `reloadConf()` / `resetStats()`: `{success, message}`\n- `cancelBackend()` / `terminateBackend()`: `{success, message}`\n\n## Backup Tools\n\nCore: `dumpTable()`, `dumpSchema()`, `copyExport()`, `copyImport()`, `createBackupPlan()`, `restoreCommand()`, `physical()`, `restoreValidate()`, `scheduleOptimize()`\n\nResponse Structures:\n\n- `dumpTable`: `{ddl, type, note, insertStatements?}` \u2014 `insertStatements` only with `includeData: true` (separate field from `ddl`)\n- `copyExport`: `{data, rowCount, truncated?, limit?}` \u2014 `data` contains CSV/text content. `truncated: true` + `limit` when rows returned equals applied limit (indicating more rows likely exist)\n- `copyImport`: `{command, stdinCommand, notes}` \u2014 Both file and stdin COPY commands\n- `createBackupPlan`: `{strategy: {fullBackup, walArchiving}, estimates}`\n- `restoreCommand`: `{command, warnings?, notes}` \u2014 Warnings when `database` omitted\n- `restoreValidate`: `{note?, validationSteps: [{step, name, command?, commands?, note?}], recommendations}` \u2014 Top-level `note` when `backupType` omitted (defaults to pg_dump). Step-level `note` for non-command steps\n- `physical`: `{command, notes, requirements}`\n- `scheduleOptimize`: `{analysis, recommendation, commands}`\n\n\uD83D\uDCE6 **AI-Optimized Payloads**: `copyExport` limits results to 500 rows by default to prevent large payloads. Use `limit: 0` for all rows, or specify a custom limit.\n\n- `pg_copy_export`: Use `query`/`sql` OR `table`. \u26A0\uFE0F If both provided, `query` takes precedence with warning. Supports `schema.table` format (auto-parsed, takes priority over `schema` param). Format: `csv` (default, comma-delimited), `text` (tab-delimited). Both formats support `header: true` (default). \u26D4 `binary` not supported via MCP\u2014use `pg_dump_schema` for binary exports. Default `limit: 500` (use `0` for all rows). Optional `delimiter` to customize\n- `pg_dump_table`: Returns `ddl` + `insertStatements` when `includeData: true`. Supports sequences (`type: 'sequence'`), views (`type: 'view'`), and partitioned tables (`type: 'partitioned_table'` with `PARTITION BY` clause). **PRIMARY KEYS, INDEXES, CONSTRAINTS NOT included**\u2014use `pg_get_indexes`/`pg_get_constraints`. Supports `schema.table` format\n- `pg_dump_schema`: Generates pg_dump command. Optional `schema`, `table`, `filename`\n- `pg_copy_import`: Generates COPY FROM command. Supports `schema.table` format (auto-parsed, takes priority over `schema` param). `columns` array, `filePath`, `format`, `header`, `delimiter`\n- `pg_restore_command`: Include `database` parameter for complete command. Optional `schemaOnly`, `dataOnly`\n- `pg_create_backup_plan`: Generates backup strategy with cron schedule. `frequency`: 'hourly'|'daily'|'weekly', `retention` count\n- `pg_backup_physical`: Generates pg_basebackup command. `format`: 'plain'|'tar' (default: 'tar'), `checkpoint`: 'fast'|'spread', `compress`: 0-9\n- `pg_restore_validate`: Generates validation commands. `backupType`: 'pg_dump' (default)|'pg_basebackup'\n- `pg_backup_schedule_optimize`: Analyzes database activity patterns and recommends optimal backup schedule\n\n**Top-Level Aliases**: `pg.dumpTable()`, `pg.dumpSchema()`, `pg.copyExport()`, `pg.copyImport()`, `pg.createBackupPlan()`, `pg.restoreCommand()`, `pg.restoreValidate()`, `pg.physical()`, `pg.backupPhysical()`, `pg.scheduleOptimize()`, `pg.backupScheduleOptimize()`\n\n## Text Tools\n\nDefaults: `threshold`=0.3 (use 0.1-0.2 for partial), `maxDistance`=3 (use 5+ for longer strings)\n\n- All text tools support `schema.table` format (auto-parsed, embedded schema takes priority over explicit `schema` param)\n- `pg_text_search`: Supports both `column` (singular string) and `columns` (array). Either is valid\u2014`column` auto-converts to array\n- \uD83D\uDCE6 **AI-Optimized Payloads**: All row-returning text tools (`pg_text_search`, `pg_text_rank`, `pg_text_headline`, `pg_trigram_similarity`, `pg_fuzzy_match`, `pg_regexp_match`, `pg_like_search`) default to 100 results. Returns `truncated: true` + `hint` when capped. Use `limit: 0` for all rows\n- `pg_fuzzy_match`: Levenshtein returns distance (lower=better). Soundex/metaphone return phonetic codes (exact match only). \u26D4 Invalid `method` values throw error with valid options\n- `pg_text_normalize`: Removes accents only (unaccent). Does NOT lowercase/trim\n- \uD83D\uDCCD **Table vs Standalone**: `normalize`, `sentiment`, `toVector`, `toQuery`, `searchConfig` are standalone (text input only). For phonetic matching: use `pg_fuzzy_match` with `method: 'soundex'|'metaphone'` (direct MCP), or `pg.text.soundex()`/`pg.text.metaphone()` (Code Mode convenience wrappers that call fuzzyMatch internally)\n\n**Top-Level Aliases**: `pg.textSearch()`, `pg.textRank()`, `pg.textHeadline()`, `pg.textNormalize()`, `pg.textSentiment()`, `pg.textToVector()`, `pg.textToQuery()`, `pg.textSearchConfig()`, `pg.textTrigramSimilarity()`, `pg.textFuzzyMatch()`, `pg.textLikeSearch()`, `pg.textRegexpMatch()`, `pg.textCreateFtsIndex()`\n\n## Schema Tools\n\nCore: `listSchemas()`, `createSchema()`, `dropSchema()`, `listViews()`, `createView()`, `dropView()`, `listSequences()`, `createSequence()`, `dropSequence()`, `listFunctions()`, `listTriggers()`, `listConstraints()`\n\nResponse Structures:\n\n- `listSchemas()`: `{schemas: string[], count}`\n- `listViews({ includeMaterialized?, truncateDefinition?, limit?, schema? })`: `{views: [{schema, name, type, definition, definitionTruncated?}], count, hasMatViews, truncatedDefinitions?, truncated, totalCount?, note?}`. Default `limit: 50` (use `0` for all). Default `truncateDefinition: 500` chars (use `0` for full definitions). `truncated` always included (`true`/`false`). `totalCount` included when truncated. \u26A0\uFE0F Validates schema existence\u2014nonexistent schema returns `{success: false, error: \"...\"}`\n- `listSequences({ schema?, limit? })`: `{sequences: [{schema, name, owned_by}], count, truncated, totalCount?, note?}`. Default `limit: 50` (use `0` for all). Returns `truncated: true` + `totalCount` when results are limited. \u26A0\uFE0F Validates schema existence\u2014nonexistent schema returns `{success: false, error: \"...\"}`. Note: `owned_by` omits `public.` prefix for sequences in public schema (e.g., `users.id` not `public.users.id`)\n- `listFunctions({ schema?, limit?, exclude? })`: `{functions: [{schema, name, arguments, returns, language, volatility}], count, limit}`\n- `listTriggers({ schema?, table? })`: `{triggers: [{schema, table_name, name, timing, events, function_name, enabled}], count}`\n- `listConstraints({ schema?, table?, type? })`: `{constraints: [{schema, table_name, name, type, definition}], count}`. Type filter values: `primary_key`, `foreign_key`, `unique`, `check`. Returned `type` field uses matching human-readable names\n- `dropSchema/dropView/dropSequence`: All return `{existed: true/false}` to indicate if object existed before drop\n- `createSchema/createSequence` (with `ifNotExists`) and `createView` (with `orReplace`): Return `{alreadyExisted: true/false}` when the flag is set. Without `ifNotExists`/`orReplace`, the field is omitted\n\n- `pg_create_view`: Supports `schema.name` format (auto-parsed). Use `orReplace: true` for CREATE OR REPLACE. `checkOption`: 'cascaded', 'local', 'none'. \u26D4 OR REPLACE can add new columns but cannot rename/remove existing ones\u2014PostgreSQL limitation\n- `pg_create_sequence`: Supports `schema.name` format. Parameters: `start`, `increment`, `minValue`, `maxValue`, `cache`, `cycle`, `ownedBy`, `ifNotExists`\n- `pg_list_functions`: Default limit=500. Use `schema: 'public'`, `limit: 2000`, or `exclude: ['postgis', 'pg_trgm', 'ltree', 'citext', 'fuzzystrmatch', 'pg_stat_statements', 'hypopg', 'unaccent', 'pg_stat_kcache', 'pgcrypto', 'partman', 'vector', 'topology']` to filter. \u26A0\uFE0F `exclude` filters by **schema name** AND extension-owned functions. The `language` filter does NOT exclude extension functions\u2014use `exclude` alongside `language` for clean results. Note: Aggressive `exclude` may return 0 results if all functions belong to excluded extensions\n\n\uD83D\uDCE6 **AI-Optimized Payloads**: `listViews({ limit? })` and `listSequences({ limit? })` both default to 50 rows. Returns `truncated: true` + `totalCount` when limited. Use `limit: 0` for all\n\n**Discovery**: `pg.schema.help()` returns `{methods, methodAliases, examples}` object\n\n## Partitioning Tools\n\n- `pg_create_partitioned_table`: `partitionBy` case-insensitive. Supports `schema.table` format for `name` (auto-parsed). `primaryKey` accepts array (e.g., `['id', 'event_date']`). \u26D4 `primaryKey`/`unique` must include partition key\u2014throws validation error otherwise\n- `pg_create_partition`: Use `parent`/`table`/`parentTable`. `forValues` is a raw SQL string: `\"FROM ('2024-01-01') TO ('2024-07-01')\"`, `\"IN ('US', 'CA')\"`, `\"WITH (MODULUS 4, REMAINDER 0)\"`. For DEFAULT partition, use `isDefault: true`. Supports `schema.table` format for `parent` (auto-parsed)\n- `pg_attach_partition`/`pg_detach_partition`: Support `schema.table` format for `parent` and `partition` (auto-parsed). For DEFAULT partition, use `isDefault: true` or `forValues: \"DEFAULT\"`\n- `pg_list_partitions`: Default `limit: 50` (use `0` for all). Returns `{partitions, count, truncated, totalCount?}`. Uses `bounds` field (consistent with `pg_partition_info`)\n- `pg_partition_info`: Returns `{tableInfo, partitions, totalSizeBytes}`. Uses `bounds` field\n- Both list/info tools support `schema.table` format (auto-parsed) and accept `table`, `parent`, `parentTable`, or `name` aliases\n- Response structures: `pg_create_partitioned_table` \u2192 `{success, table, partitionBy, partitionKey, primaryKey?}`. `pg_create_partition` \u2192 `{success, partition, parent, bounds, subpartitionBy?, subpartitionKey?}`. `pg_attach_partition` \u2192 `{success, parent, partition, bounds}`. `pg_detach_partition` \u2192 `{success, parent, partition}`\n- \u26A0\uFE0F Sub-partitioning: `subpartitionBy`/`subpartitionKey` on `pg_create_partition` makes a partition itself partitionable. The parent's `primaryKey` must include the sub-partition key column (PostgreSQL constraint)\n- \uD83D\uDCCD Code Mode: `pg.partitioning.create()` = `createPartition`, NOT `createPartitionedTable`\n\n## pg_partman Tools\n\n- `pg_partman_create_parent`: Interval uses PostgreSQL syntax ('1 day', '1 month') NOT keywords ('daily'). `startPartition` accepts 'now' shorthand for current date. Required params: `parentTable`/`table`, `controlColumn`/`control`/`column`, `interval`\n- `pg_partman_run_maintenance`: Without `parentTable`, maintains ALL partition sets. Returns `partial: true` when some tables are skipped. `orphaned` object groups orphaned configs with `count`, `tables`, and cleanup `hint`. `errors` array for other failures\n- `pg_partman_show_config`: Default `limit: 50` (use `0` for all). Returns `truncated` + `totalCount` when limited. `orphaned` flag per config. Supports `schema.table` or plain table name (auto-prefixes `public.`)\n- `pg_partman_show_partitions`: Default `limit: 50` (use `0` for all). Returns `truncated` + `totalCount` when limited. `parentTable` required. Supports `schema.table` format (auto-parsed)\n- `pg_partman_check_default`/`partition_data`: `parentTable` required. Supports `schema.table` format (auto-parsed)\n- `pg_partman_set_retention`: \u26A0\uFE0F **CAUTION: Default is DROP** \u2014 `retentionKeepTable: false` (default) = DROP partitions, `true` = detach only (safer). Pass `retention: null` to disable retention\n- `pg_partman_undo_partition`: `targetTable` MUST exist before calling. Requires both `parentTable` and `targetTable`/`target`. \u26A0\uFE0F Parent table and child partitions remain after undo\u2014use `DROP TABLE parent CASCADE` to clean up\n- `pg_partman_analyze_partition_health`: Default `limit: 50` (use `0` for all). Returns `truncated` + `totalCount` when limited. `summary.overallHealth`: 'healthy'|'warnings'|'issues_found'\n- \uD83D\uDCDD **Schema Resolution**: All partman tools auto-prefix `public.` when no schema specified in `parentTable`\n- \uD83D\uDCDD **Aliases**: `parentTable` accepts `table`, `parent`, `name`. `controlColumn` accepts `control`, `column`. `targetTable` accepts `target`\n\n## pg_stat_kcache Tools\n\nCore: `createExtension()`, `queryStats()`, `topCpu()`, `topIo()`, `databaseStats()`, `resourceAnalysis()`, `reset()`\n\n- `pg_kcache_query_stats`: Default `limit: 20` (use `0` for all). Returns `truncated` + `totalCount` when limited. `orderBy`: 'total_time' (default), 'cpu_time', 'reads', 'writes'. `queryPreviewLength`: chars for query preview (default: 100, max: 500, 0 for full). \u26D4 'calls' NOT valid for orderBy\u2014use `minCalls` param\n- `pg_kcache_resource_analysis`: Default `limit: 20` (use `0` for all). Returns `truncated` + `totalCount` when limited. `minCalls`, `queryPreviewLength` supported. Classifies queries as 'CPU-bound', 'I/O-bound', or 'Balanced'\n- `pg_kcache_top_cpu`: Top CPU-consuming queries. `limit` param (default: 10). `queryPreviewLength`: chars for query preview (default: 100, max: 500, 0 for full). Returns `truncated` + `totalCount` when limited\n- `pg_kcache_top_io`: `type`/`ioType` (alias): 'reads', 'writes', 'both' (default). `limit` param (default: 10). `queryPreviewLength`: chars for query preview (default: 100, max: 500, 0 for full). Returns `truncated` + `totalCount` when limited\n- `pg_kcache_database_stats`: Aggregated CPU/IO stats per database. Optional `database` param to filter specific db\n- `pg_kcache_reset`: Resets pg_stat_kcache AND pg_stat_statements statistics\n\n## citext Tools\n\nCore: `createExtension()`, `convertColumn()`, `listColumns()`, `analyzeCandidates()`, `compare()`, `schemaAdvisor()`\n\n- `pg_citext_create_extension`: Enable citext extension (idempotent). Returns `{success, message, usage}`\n- `pg_citext_convert_column`: Supports `schema.table` format (auto-parsed). \u26D4 Only allows text-based columns (text, varchar, character varying)\u2014non-text columns return `{success: false, error, allowedTypes, suggestion}`. When views depend on column, returns `{success: false, dependentViews, hint}`\u2014drop/recreate views manually. `col` alias for `column`. Returns `{previousType}` showing original type\n- `pg_citext_list_columns`: Default `limit: 100` (use `0` for all). Returns `{columns: [{table_schema, table_name, column_name, is_nullable, column_default}], count, totalCount, truncated}`. Optional `schema`, `limit` filters\n- `pg_citext_analyze_candidates`: Default `limit: 50` (use `0` for all). Default `excludeSystemSchemas: true` filters out extension schemas (cron, topology, partman, tiger) when no `schema`/`table` filter specified\u2014use `excludeSystemSchemas: false` to include all. Returns `truncated: true` + `totalCount` when results are limited. Scans tables for TEXT/VARCHAR columns matching common patterns (email, username, name, etc.). Optional `schema`, `table`, `limit`, `excludeSystemSchemas`, `patterns` filters. Returns `{candidates, count, totalCount, truncated, summary: {highConfidence, mediumConfidence}, recommendation, patternsUsed, excludedSchemas?}`\n- `pg_citext_compare`: Test case-insensitive comparison. Returns `{value1, value2, citextEqual, textEqual, lowerEqual, extensionInstalled}`\n- `pg_citext_schema_advisor`: Supports `schema.table` format (auto-parsed). Analyzes specific table. Returns `{table, recommendations: [{column, currentType, previousType?, recommendation, confidence, reason}], summary, nextSteps}`. `tableName` alias for `table`. Already-citext columns include `previousType: \"text or varchar (converted)\"`\n\n**Discovery**: `pg.citext.help()` returns `{methods, methodAliases, examples}` object\n\n## ltree Tools\n\nCore: `createExtension()`, `query()`, `match()`, `subpath()`, `lca()`, `listColumns()`, `convertColumn()`, `createIndex()`\n\n- `pg_ltree_create_extension`: Enable ltree extension (idempotent). Returns `{success, message}`\n- `pg_ltree_query`: Query hierarchical relationships. Supports `schema.table` format (auto-parsed). `mode`/`type`: 'ancestors', 'descendants' (default), 'exact'. Returns `{results, count, path, mode, isPattern}`. \u26A0\uFE0F Validates column is ltree type\u2014returns clear error for non-ltree columns\n- `pg_ltree_match`: Match paths using lquery pattern syntax (`*`, `*{1,2}`, `*.label.*`). Supports `schema.table` format. `pattern`/`lquery`/`query` aliases. Returns `{results, count, pattern}`\n- `pg_ltree_subpath`: Extract portion of ltree path. `offset`/`start`/`from` and `length`/`len` aliases. Negative `offset` counts from end. \u26A0\uFE0F Returns `{success: false, error, pathDepth}` for invalid offset (validated before PostgreSQL call)\n- `pg_ltree_lca`: Find longest common ancestor of multiple paths. Requires `paths` array (min 2). Returns `{longestCommonAncestor, hasCommonAncestor: bool, paths}`\n- `pg_ltree_list_columns`: List all ltree columns in database. Optional `schema` filter. Returns `{columns: [{table_schema, table_name, column_name, is_nullable, column_default}], count}`\n- `pg_ltree_convert_column`: Convert TEXT column to ltree. Supports `schema.table` format. `col` alias for `column`. Returns `{previousType}`. \u26A0\uFE0F When views depend on column, returns `{success: false, dependentViews, hint}`\u2014drop/recreate views manually\n- `pg_ltree_create_index`: Create GiST index on ltree column. Supports `schema.table` format. Auto-generates index name if `indexName` omitted. Returns `{indexName, indexType: 'gist', alreadyExists?}`\n\n**Discovery**: `pg.ltree.help()` returns `{methods, methodAliases, examples}` object. Top-level aliases available: `pg.ltreeQuery()`, `pg.ltreeMatch()`, etc.\n\n## PostGIS Tools\n\n**Geometry Creation:**\n\n- `pg_geocode`: Create point geometry from lat/lng. Returns `{geojson, wkt}`. \u26A0\uFE0F Validates bounds: lat \u00B190\u00B0, lng \u00B1180\u00B0\n- `pg_geometry_column`: Add geometry column to table. `ifNotExists` returns `{alreadyExists: true}`\n- `pg_spatial_index`: Create GiST spatial index. Auto-generates name if not provided. `ifNotExists` supported\n\n**Spatial Queries:**\n\n- `pg_distance`: Find geometries within distance from point. Returns `{results, count}` with `distance_meters`. \u26A0\uFE0F Validates point bounds\n- `pg_bounding_box`: Find geometries within lat/lng bounding box. Use `select` array for specific columns\n- `pg_intersection`: Find geometries intersecting a WKT/GeoJSON geometry. Auto-detects SRID from column\n- `pg_point_in_polygon`: Check if point is within table polygons. Returns `{containingPolygons, count}`. \u26A0\uFE0F Validates point bounds\n\n**Geometry Operations (Table-based):**\n\n- `pg_buffer`: Create buffer zone around table geometries. Default limit: 50 rows. Default simplify: 10m (set `simplify: 0` to disable). Returns `truncated: true` + `totalCount` when results are truncated. Use `limit: 0` for all rows\n- `pg_geo_transform`: Transform table geometries between SRIDs. Default limit: 50 rows. Returns `truncated: true` + `totalCount` when results are truncated. Use `limit: 0` for all rows. Auto-detects `fromSrid` from column metadata if not provided (returns `autoDetectedSrid: true`). `fromSrid`/`sourceSrid` and `toSrid`/`targetSrid` aliases\n- `pg_geo_cluster`: Spatial clustering (DBSCAN/K-Means). K-Means: If `numClusters` exceeds row count, automatically clamps to available rows with `warning` field. DBSCAN: Returns contextual `hints` array explaining parameter effects (e.g., \"All points formed single cluster\u2014decrease eps\") and `parameterGuide` explaining eps/minPoints trade-offs\n\n**Geometry Operations (Standalone WKT/GeoJSON):**\n\n- `pg_geometry_buffer`: Create buffer around WKT/GeoJSON. Returns `{buffer_geojson, buffer_wkt, distance_meters}`. Optional `simplify` param (meters) reduces polygon complexity\u2014returns `simplified`, `simplifyTolerance` when applied. \u26A0\uFE0F Returns `warning` if simplify tolerance is too high and geometry collapses to null\n- `pg_geometry_transform`: Transform WKT/GeoJSON between SRIDs. Returns `{transformed_geojson, transformed_wkt, fromSrid, toSrid}`\n- `pg_geometry_intersection`: Compute intersection of two geometries. Returns `{intersects, intersection_geojson, intersection_area_sqm}`. Normalizes SRID (4326) automatically\u2014safe to mix GeoJSON and WKT\n\n**Administration:**\n\n- `pg_postgis_create_extension`: Enable PostGIS extension (idempotent)\n- `pg_geo_index_optimize`: Analyze spatial indexes. Without `table` param, analyzes all spatial indexes\n\n**Code Mode Aliases:** `pg.postgis.addColumn()` \u2192 `geometryColumn`, `pg.postgis.indexOptimize()` \u2192 `geoIndexOptimize`, `pg.postgis.geoCluster()` \u2192 `pg_geo_cluster`, `pg.postgis.geoTransform()` \u2192 `pg_geo_transform`. Note: `pg.{group}.help()` returns `{methods, methodAliases, examples}`\n\n## Cron Tools (pg_cron)\n\nCore: `createExtension()`, `schedule()`, `scheduleInDatabase()`, `unschedule()`, `alterJob()`, `listJobs()`, `jobRunDetails()`, `cleanupHistory()`\n\n- `pg_cron_schedule`: Schedule a cron job. `schedule` supports standard cron (`0 5 * * *`) or interval (`1 second` to `59 seconds`). \u26A0\uFE0F Interval syntax only works for 1-59 seconds\u2014for 60+ seconds, use cron syntax (e.g., `* * * * *` for every minute). Use `name`/`jobName` for identification. `command`/`sql`/`query` aliases supported. Note: pg_cron allows duplicate job names; use unique names to avoid confusion when unscheduling\n- `pg_cron_schedule_in_database`: Schedule job in specific database. `database`/`db` aliases. Optional `username`, `active` params\n- `pg_cron_unschedule`: Remove job by `jobId` or `jobName`. If both provided, `jobName` takes precedence (with warning)\n- `pg_cron_alter_job`: Modify existing job. Can change `schedule`, `command`, `database`, `username`, `active`. \u26D4 Non-existent jobId returns error\n- `pg_cron_list_jobs`: List all jobs. Default `limit: 50` (use `0` for all). Optional `active` boolean filter. Returns `truncated` + `totalCount` when limited. Returns `hint` when jobs have no name\n- `pg_cron_job_run_details`: View execution history. Default `limit: 50`. Optional `jobId`, `status` ('running'|'succeeded'|'failed') filters. Returns `truncated` + `totalCount` when limited. Returns `summary` with counts\n- `pg_cron_cleanup_history`: Delete old run records. `olderThanDays`/`days` param (default: 7). Optional `jobId` to target specific job\n- `pg_cron_create_extension`: Enable pg_cron extension (idempotent). Requires superuser\n\n**Discovery**: `pg.cron.help()` returns `{methods, methodAliases, examples}` object\n\n## pgcrypto Tools\n\nCore: `createExtension()`, `hash()`, `hmac()`, `encrypt()`, `decrypt()`, `genRandomUuid()`, `genRandomBytes()`, `genSalt()`, `crypt()`\n\n- `pg_pgcrypto_create_extension`: Enable pgcrypto extension (idempotent). Returns `{success, message}`\n- `pg_pgcrypto_hash`: Hash data using digest algorithms. `algorithm`: 'md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512'. `encoding`: 'hex' (default), 'base64'. Returns `{hash, algorithm, encoding, inputLength}`\n- `pg_pgcrypto_hmac`: HMAC authentication. Same algorithms as hash. Returns `{hmac, algorithm, encoding}`. `key` param for secret\n- `pg_pgcrypto_encrypt`: PGP symmetric encryption. `data` + `password`/`key` (aliases). Optional `options` for cipher config (e.g., 'cipher-algo=aes256'). Returns `{encrypted, encoding: 'base64'}`\n- `pg_pgcrypto_decrypt`: Decrypt PGP-encrypted data. `encryptedData`/`data` + `password`/`key` (aliases). Returns `{decrypted, verified}`. \u26D4 Throws on wrong key/corrupt data\n- `pg_pgcrypto_gen_random_uuid`: Generate UUID v4. Optional `count` (1-100, default 1). Returns `{uuid, uuids, count}` (`uuid` convenience property for single requests)\n- `pg_pgcrypto_gen_random_bytes`: Generate random bytes. `length` (1-1024). `encoding`: 'hex' (default), 'base64'. Returns `{randomBytes, length, encoding}`\n- `pg_pgcrypto_gen_salt`: Generate salt for crypt(). `type`: 'bf' (bcrypt, recommended), 'md5', 'xdes', 'des'. Optional `iterations` for bf (4-31) or xdes. Returns `{salt, type}`\n- `pg_pgcrypto_crypt`: Hash password with salt. Use stored hash as salt for verification. Returns `{hash, algorithm}`. Verification: `crypt(password, storedHash).hash === storedHash`\n\n**Password Workflow**: 1) `genSalt({type:'bf', iterations:10})` \u2192 2) `crypt({password, salt})` \u2192 store hash \u2192 3) Verify: `crypt({password, salt: storedHash})` and compare hashes\n\n**Top-Level Aliases**: `pg.pgcryptoHash()`, `pg.pgcryptoEncrypt()`, `pg.pgcryptoDecrypt()`, `pg.pgcryptoGenRandomUuid()`, etc.\n\n**Discovery**: `pg.pgcrypto.help()` returns `{methods, methodAliases, examples}` object\n\n## Code Mode Sandbox\n\nNo `setTimeout`, `setInterval`, `fetch`, or network access. Use `pg.core.readQuery()` for data access.\n\n\uD83D\uDCCA **Metrics Note**: `memoryUsedMb` measures heap delta (end - start). Negative values indicate memory freed during execution (e.g., GC ran).\n\n## Transactions\n\nCore: `begin()`, `commit()`, `rollback()`, `savepoint()`, `rollbackTo()`, `release()`, `execute()`\n\n**Transaction Lifecycle:**\n\n- `pg_transaction_begin`: Start new transaction. Returns `{transactionId, isolationLevel, message}`. Use `transactionId` for subsequent operations\n- `pg_transaction_commit`: Commit transaction, making all changes permanent. `transactionId`/`tx`/`txId` aliases\n- `pg_transaction_rollback`: Rollback transaction, discarding all changes. `transactionId`/`tx`/`txId` aliases\n\n**Savepoints:**\n\n- `pg_transaction_savepoint`: Create savepoint within transaction. `name`/`savepoint` + `transactionId`/`tx`/`txId`\n- `pg_transaction_rollback_to`: Rollback to savepoint, restoring database state to when the savepoint was created. \u26A0\uFE0F Undoes ALL work (data changes AND savepoints) created after the target savepoint\n- `pg_transaction_release`: Release savepoint, keeping all changes since it was created. `name`/`savepoint` aliases\n\n**Atomic Execution:**\n\n- `pg_transaction_execute`: Execute multiple statements atomically. Two modes:\n - **Auto-commit**: Without `transactionId`\u2014auto-commits on success, auto-rollbacks on any error\n - **Join existing**: With `transactionId`/`tx`/`txId`\u2014no auto-commit, caller controls via commit/rollback\n- `statements`: Array of `{sql: \"...\", params?: [...]}` objects. \u26A0\uFE0F Each object MUST have `sql` key\n- `isolationLevel`: Optional isolation level for new transactions ('READ COMMITTED', 'REPEATABLE READ', 'SERIALIZABLE')\n- Supports SELECT statements inside `statements`\u2014results include `rows` in the response for mixed read/write workflows\n\n**Aborted Transaction State:**\n\n- \u26A0\uFE0F If any statement in a transaction fails, PostgreSQL puts the transaction into an **aborted state**\n- In aborted state, only `ROLLBACK` or `ROLLBACK TO SAVEPOINT` commands are accepted\u2014all other commands will error\n- Use `pg_transaction_rollback` to end the transaction, or `pg_transaction_rollback_to` to recover to a savepoint\n- `pg_transaction_commit` on an aborted transaction will detect the state and report it (not silently rollback)\n\n**Response Structures:**\n\n- `begin`: `{transactionId, isolationLevel: 'READ COMMITTED', message}`\n- `commit/rollback`: `{success, transactionId, message}`\n- `savepoint/release/rollbackTo`: `{success, transactionId, savepoint, message}`\n- `execute`: `{success, statementsExecuted, results: [{sql, rowsAffected, rowCount, rows?}], transactionId?}`\n\n**Discovery**: `pg.transactions.help()` returns `{methods, methodAliases, examples}`\n\n## Introspection Tools\n\nCode Mode: `pg.introspection.*` \u2014 12 tools for schema analysis and migration tracking.\nCore: `dependencyGraph()`, `topologicalSort()`, `cascadeSimulator()`, `schemaSnapshot()`, `constraintAnalysis()`, `migrationRisks()`, `migrationInit()`, `migrationRecord()`, `migrationApply()`, `migrationRollback()`, `migrationHistory()`, `migrationStatus()`\n\n**Schema Analysis (6 tools):**\n\n- `pg_dependency_graph`: FK dependency graph with cycle detection, row counts, edge annotations (CASCADE, RESTRICT, SET NULL, SET DEFAULT, NO ACTION). Params: `schema?`, `includeRowCounts?` (default: true), `excludeExtensionSchemas?` (default: true, excludes cron/topology/tiger/tiger_data)\n- `pg_topological_sort`: Safe DDL execution order via Kahn's algorithm. `direction: 'create'` (default) = dependencies first; `direction: 'drop'` = dependents first. `excludeExtensionSchemas?` (default: true). Self-referencing FKs are filtered (don't affect ordering)\n- `pg_cascade_simulator`: Simulates DELETE/DROP/TRUNCATE impact with cascade path tracing. `operation`: 'DELETE' (default), 'DROP', 'TRUNCATE'. \u26A0\uFE0F DROP/TRUNCATE force-cascade regardless of FK ON DELETE rule \u2192 always `severity: 'critical'` when dependent tables exist. Returns `{sourceTable, operation, affectedTables, severity, stats}`. Stats include `blockingActions` (NO ACTION + RESTRICT FKs that would prevent the operation)\n- `pg_schema_snapshot`: Full schema snapshot in one call. `sections?`: `['tables','views','indexes','constraints','functions','triggers','sequences','types','extensions']` to limit output. `compact?`: `true` to omit per-column details from tables section for reduced payload (use `pg_describe_table` to drill into specific tables). `excludeExtensionSchemas?` (default: true): excludes cron, topology, tiger, tiger_data schemas. `schema?`: filter to specific schema. Returns `{snapshot, stats, generatedAt, compact?}`\n- `pg_constraint_analysis`: Identifies constraint issues. `checks?`: `['redundant','missing_fk','missing_not_null','missing_pk','unindexed_fk']`. Returns `{findings, summary}`\n- `pg_migration_risks`: Static DDL risk assessment. \u26A0\uFE0F Does NOT validate object existence\u2014analyzes SQL patterns only. Returns `{risks, summary}`\n\n**Migration Tracking (6 tools):**\n\n- `pg_migration_init`: Initialize/verify `_mcp_schema_versions` tracking table (idempotent). Returns `{success, tableCreated, tableName, existingRecords}`\n- `pg_migration_record`: Record a migration with SHA-256 hash dedup. \u26A0\uFE0F Records metadata only\u2014does NOT execute the SQL. Use `pg_migration_apply` instead for complete migrations. Params: `version`, `description?`, `migrationSql`, `rollbackSql?`, `sourceSystem?`. Returns `{success, record}`\n- `pg_migration_apply`: Execute migration SQL and record it atomically in a single transaction. On failure, rolls back and records status as 'failed'. Same params as `pg_migration_record`. Returns `{success, record}` or `{success: false, error}`\n- `pg_migration_rollback`: Execute stored rollback SQL in a transaction. `dryRun: true` previews without executing (default: `false` \u2014 executes immediately). Lookup by `id` or `version`. Returns `{success, dryRun, rollbackSql, record}`\n- `pg_migration_history`: Query migration history with `status?` ('applied'|'rolled_back'|'failed'), `sourceSystem?`, `limit?`, `offset?`. Returns `{records, total, limit, offset}`\n- `pg_migration_status`: Aggregate dashboard. Returns `{initialized, latestVersion, counts, sourceSystems}`\n\n**Discovery**: `pg.introspection.help()` returns `{methods, methodAliases, examples}`\n";
16
+ export declare const SERVER_INSTRUCTIONS = "# postgres-mcp Code Mode\n\n## \u26A0\uFE0F Critical Gotchas\n\n1. **Transactions**: `pg.transactions.execute({statements: [{sql: \"...\"}]})` auto-commits on success, auto-rollbacks on error. To join existing transaction: `{transactionId: txId, statements: [...]}` (no auto-commit, caller controls)\n2. **pg_write_query**: \u26D4 Throws for SELECT\u2014use `pg_read_query` for SELECT statements\n3. **pg_upsert/pg_create_table**: `schema.table` format auto-parses (e.g., `'myschema.users'` \u2192 schema: 'myschema', table: 'users')\n4. **pg_create_table columns**: `notNull`, `defaultValue` (string literals auto-quoted; numbers/booleans auto-coerced; `now()` \u2192 `CURRENT_TIMESTAMP`), `check`, `references` (object or string `\"table(column)\"` syntax)\n5. **pg_create_table constraints**: `constraints` array only accepts `{type: 'unique'|'check'}`. Primary keys: use `column.primaryKey` or top-level `primaryKey: ['col1', 'col2']`\n6. **pg_create_index expression**: Columns can be expressions like `LOWER(name)` or `UPPER(email)`\u2014auto-detected. \u26A0\uFE0F Cast syntax (`::`) requires raw SQL via `pg_write_query`\n7. **pg_list_objects type**: Use `type` (singular string) or `types` (array). Auto-converts: `{type: 'table'}` \u2261 `{types: ['table']}`\n8. **pg_object_details**: Accepts: `name`, `objectName`, `object`, or `table`. Use `type`/`objectType` for type hint (supports: table, view, materialized_view, partitioned_table, function, sequence, index)\n9. **pg_exists optional WHERE**: `where`/`condition`/`filter` is optional. Without it, checks if table has any rows\n10. **pg_describe_table**: Returns columns, foreignKeys, primaryKey, indexes, constraints. For listing ALL database indexes (not table-specific), use `pg_get_indexes` without `table` param\n11. **pg_vector_insert updateExisting**: Uses direct UPDATE (avoids NOT NULL constraint issues vs INSERT mode)\n12. **pg_get_indexes without table**: Returns ALL database indexes (potentially large). Use `table` param for specific table\n13. **pg_upsert/pg_batch_insert RETURNING**: `returning` param must be array of column names: `[\"id\", \"name\"]`. \u26D4 `\"*\"` wildcard not supported\n14. **Small tables**: Optimizer correctly uses Seq Scan for <1000 rows\u2014this is expected behavior\n\n## \uD83D\uDD04 Response Structures\n\n| Tool | Returns | Notes |\n| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------- | ---------------------------------------------------------------------------------------- |\n| `pg_read_query` | `{rows, rowCount, fields?}` | `fields` contains column metadata (name, dataTypeID) |\n| `pg_write_query` | `{rowsAffected, affectedRows, rows?}` | `rows` only with RETURNING clause. DDL statements return `rowsAffected: 0`. \u26D4 Throws for SELECT |\n| `pg_upsert` | `{success, operation, rowsAffected, rowCount, rows?}` | `operation: 'insert' | 'update'`. `rows` only with RETURNING clause |\n| `pg_batch_insert` | `{success, rowsAffected, affectedRows, insertedCount, rowCount, rows?}` | Empty objects use DEFAULT VALUES. \u26A0\uFE0F BIGINT > 2^53 loses precision |\n| `pg_create_table` | `{success, table, sql, compositePrimaryKey?}` | `table` = schema-qualified name. `compositePrimaryKey` only when composite PK used |\n| `pg_drop_table` | `{success, dropped, existed}` | `existed` indicates whether table was present before drop |\n| `pg_create_index` | `{success, index, indexName, table, sql, ifNotExists?, alreadyExists?, message?}` | `alreadyExists`/`message` only with `ifNotExists: true` when index pre-exists |\n| `pg_drop_index` | `{success, index, existed, sql}` | `existed` indicates whether index was present before drop |\n| `pg_truncate` | `{success, table, cascade, restartIdentity}` | `cascade`/`restartIdentity` reflect the options used |\n| `pg_count` | `{count: N}` | Use `params` for placeholders: `where: 'id=$1', params: [5]`. DISTINCT: use `pg_read_query` |\n| `pg_exists` | `{exists: bool, mode, hint?}` | `params` for placeholders. `mode: 'filtered' | 'any_rows'` |\n| `pg_get_indexes` | `{indexes, count, totalCount?}` | Default `limit: 100` without `table`. Use `schema`/`limit` to filter. Index objects have `name`, `type`, `columns` |\n| `pg_list_objects` | `{objects, count, totalCount, byType}` | Use `limit` to cap results, `type`/`types` to filter |\n| `pg_object_details` | `{name, schema, type, returnType?, ...}` | Functions: `returnType` alias. Views/Mat. views: `definition`. Tables: equivalent to `pg_describe_table` (columns, primaryKey, indexes, constraints, foreignKeys) |\n| `pg_analyze_db_health` | `{cacheHitRatio, databaseSize, tableStats, unusedIndexes, tablesNeedingVacuum, connections, bloat, isReplica, overallScore, overallStatus}` | `cacheHitRatio`: `{ratio, heap, index, status}`. `overallStatus`: `healthy | needs_attention | critical`. Optional sections via `includeIndexes`, `includeVacuum`, `includeConnections` |\n| `pg_describe_table` | `{name, schema, type, owner, rowCount, columns, primaryKey, indexes, constraints, foreignKeys}` | Columns include `notNull` (alias for `!nullable`), `foreignKey`. `constraints` includes PK, UNIQUE, CHECK, NOT NULL. \u26A0\uFE0F `rowCount: -1` = stale/missing statistics (run ANALYZE on the table). Small tables (<~50 rows) may show -1 until first ANALYZE |\n| `pg_analyze_query_indexes` | `{plan, issues, recommendations}` | `verbosity`: 'summary' (default) or 'full'. Summary mode returns condensed plan |\n| `pg_list_tables` | `{tables, count, totalCount, truncated?, hint?}` | Use `schema` to filter, `limit` to cap results, `exclude` to hide extension schemas (e.g., `['cron', 'topology', 'partman']`) |\n| List operations | `{items, count}` | Access via `result.tables`, `result.views`, etc. |\n| `pg_jsonb_agg groupBy` | `{result: [{group_key, items}], count, grouped: true}` | Without groupBy: `{result: [...], count, grouped: false}` |\n| `pg_vector_aggregate` | `{average_vector, count}` or `{groups: [{group_key, average_vector, count}]}` | Without/with `groupBy` |\n| `pg_index_stats` | `{indexes, count, truncated?, totalCount?}` | Default 50 rows. Use `limit: 0` for all |\n| `pg_table_stats` | `{tables, count, truncated?, totalCount?}` | Default 50 rows. Use `limit: 0` for all |\n| `pg_vacuum_stats` | `{tables, count, truncated?, totalCount?}` | Default 50 rows. Use `limit: 0` for all |\n| `pg_stat_statements` | `{statements, count, truncated?, totalCount?}` | Default 20 rows. `orderBy` supported |\n| `pg_query_plan_stats` | `{queryPlanStats, count, truncated?, totalCount?}` | Default 20 rows. `truncateQuery: 0` for full text |\n| `pg_stat_activity` | `{connections, count, backgroundWorkers}` | `includeIdle: true` to include idle connections. `backgroundWorkers` = count of background worker processes |\n| `pg_locks` | `{locks}` | `showBlocked: true` switches to blocked/blocking pid format |\n| `pg_bloat_check` | `{tables, count}` | Tables with `live_tuples`, `dead_tuples`, `dead_pct` |\n| `pg_cache_hit_ratio` | `{heap_read, heap_hit, cache_hit_ratio}` | All fields nullable (0 tables = null). Flat response, differs from `pg_analyze_db_health.cacheHitRatio` |\n| `pg_seq_scan_tables` | `{tables, count, minScans, hint, truncated?, totalCount?}` | Default 50 rows. `minScans` default: 10 |\n| `pg_connection_pool_optimize` | `{current, config, waitEvents, recommendations}` | No params needed |\n| `pg_performance_baseline` | `{name, timestamp, metrics}` | `metrics`: `cache`, `tables`, `indexes`, `connections`, `databaseSize` |\n| `pg_duplicate_indexes` | `{duplicateIndexes, count, hint, truncated?, totalCount?}` | Default 50 rows. `duplicate_type`: EXACT_DUPLICATE, OVERLAPPING, SUBSET |\n| `pg_query_plan_compare` | `{query1, query2, analysis, fullPlans}` | `analysis.costDifference` + `recommendation` |\n| `pg_unused_indexes` | `{unusedIndexes, count, hint, truncated?, totalCount?}` | Default 20 rows. `summary: true` \u2192 `{summary, bySchema, totalCount}` |\n\n## API Mapping\n\n`pg_group_action` \u2192 `pg.group.action()` (group prefixes dropped: `pg_jsonb_extract` \u2192 `pg.jsonb.extract()`)\n\n**Top-Level Core Aliases**: All starter tools available directly: `pg.readQuery()`, `pg.writeQuery()`, `pg.listTables()`, `pg.describeTable()`, `pg.createTable()`, `pg.dropTable()`, `pg.count()`, `pg.exists()`, `pg.upsert()`, `pg.batchInsert()`, `pg.truncate()`, `pg.createIndex()`, `pg.dropIndex()`, `pg.getIndexes()`, `pg.listObjects()`, `pg.objectDetails()`, `pg.listExtensions()`, `pg.analyzeDbHealth()`, `pg.analyzeQueryIndexes()`, `pg.analyzeWorkloadIndexes()`\n\n**Positional args work**: `readQuery(\"SELECT...\")`, `exists(\"users\", \"id=1\")`, `createIndex(\"users\", [\"email\"])`\n\n**Discovery**: `pg.help()` returns `{group: methods[]}` mapping (e.g., `{core: ['readQuery', ...], jsonb: [...]}`). `pg.core.help()`, `pg.jsonb.help()` for group-specific methods.\n\n## Format Auto-Resolution\n\n- **Schema.Table**: `'public.users'` auto-parses to `{schema: 'public', table: 'users'}`\n- **JSONB Paths**: Both `'a.b.c'` (string) and `['a','b','c']` (array) work. Use array for literal dots: `[\"key.with.dots\"]`\n- **Aliases**: Common parameter variations resolve automatically (e.g., `query`/`sql`, `table`/`tableName`)\n\n---\n\n## Vector Tools\n\n\u26A0\uFE0F **Large Vectors**: Direct MCP tool calls may truncate vectors >256 dimensions due to JSON-RPC message size limits. For vectors \u2265256 dimensions (e.g., OpenAI 1536-dim, local 384-dim), use Code Mode: `await pg.vector.search({table, column, vector, limit})`\n\n- `pg_vector_search`: Supports `schema.table` format (auto-parsed). Returns `{results: [...], count, metric}`. Use `select: [\"id\", \"name\"]` to include identifying columns. Without select, only returns distance. `filter` = `where`. \u26A0\uFE0F Vectors read from DB are strings\u2014parse before passing: `vec.replace(/^\\[|\\]$/g, '').split(',').map(Number)`\n- `pg_vector_insert`: Supports `schema.table` format (auto-parsed). Use `updateExisting` + `conflictColumn` + `conflictValue` for UPDATE mode. `additionalColumns` is applied in both INSERT and UPDATE modes\n- `pg_vector_batch_insert`: `vectors` expects `[{vector: [...], data?: {...}}]` objects, not raw arrays\n- `pg_vector_normalize`: Returns `{normalized: [...], magnitude: N}`. Note: `magnitude` is the **original** vector length (not 1)\n- `pg_vector_aggregate`: Supports `schema.table` format (auto-parsed). \u26D4 Validates column is vector type. Returns `{average_vector: {preview, dimensions, truncated}, count}` or `{groups: [{group_key, average_vector, count}]}` with groupBy. \u26A0\uFE0F `groupBy` only supports simple column names (not expressions)\n- `pg_vector_dimension_reduce`: Direct mode returns `{reduced: [...], originalDimensions, targetDimensions}`. Table mode returns `{rows: [{id, original_dimensions, reduced}], processedCount, summarized}`. Default `summarize: true` in table mode returns compact `{preview, dimensions, truncated}` format. Use `summarize: false` for full vectors\n- `pg_vector_distance`: Calculate distance between two vectors. `metric`: 'l2' (default), 'cosine', 'inner_product'. Returns `{distance, metric}`\n- `pg_vector_cluster`: `clusters` = `k`. Returns centroids with `{preview, dimensions, truncated}` format for large vectors (>10 dims)\u2014use `pg_vector_distance` to assign rows\n- `pg_vector_create_index`: Use `type` (or alias `method`) with values 'ivfflat' or 'hnsw'. IVFFlat: `lists` param. HNSW: `m`, `efConstruction` params\n- `pg_vector_performance`: Auto-generates testVector from first row if omitted. Returns `testVectorSource: 'auto-generated from first row'|'user-provided'`\n- `pg_vector_validate`: Returns `{valid: bool, vectorDimensions}`. Empty vector `[]` returns `{valid: true, vectorDimensions: 0}`\n- \u26D4 `pg_vector_embed`: Demo only (hash-based). Use OpenAI/Cohere for production.\n- `pg_hybrid_search`: Supports `schema.table` format (auto-parsed). Combines vector similarity and full-text search with weighted scoring. `textColumn` auto-detects type: uses tsvector columns directly, wraps text columns with `to_tsvector()`. Code mode alias: `pg.hybridSearch()` \u2192 `pg.vector.hybridSearch()`\n- \uD83D\uDCDD **Error Handling**: Vector tools return `{success: false, error: \"...\", suggestion: \"...\"}` for validation/semantic errors (dimension mismatch, non-vector column, table not found). Check `success` field before processing results.\n\n## JSONB Tools\n\n- `pg_jsonb_extract`: Returns null if path doesn't exist\n- `pg_jsonb_insert`: Index -1 inserts BEFORE last element; use `insertAfter: true` to append. \u26A0\uFE0F Use array format `[-1]` not string `\"[-1]\"` for negative indices\n- `pg_jsonb_set`: `createMissing=true` creates full nested paths; initializes NULL columns to `{}`. Empty path (`''` or `[]`) replaces entire column value\n- `pg_jsonb_strip_nulls`: \u26A0\uFE0F Requires `where`/`filter` clause\u2014write operations must be targeted. Use `preview: true` to see changes first\n- `pg_jsonb_agg`: Supports AS aliases in select: `[\"id\", \"metadata->>'name' AS name\"]`. \u26A0\uFE0F `->>` returns text\u2014use `->` to preserve JSON types\n- `pg_jsonb_object`: Use `data`, `object`, or `pairs` parameter: `{data: {name: \"John\", age: 30}}`. Returns `{object: {...}}`\n- `pg_jsonb_normalize`: `flatten` doesn't descend into arrays; `keys` returns text (use `pairs` for JSON types)\n- `pg_jsonb_stats`: Returns column-level statistics. `topKeysLimit` controls key count (default: 20). \u26A0\uFE0F `typeDistribution` null type = SQL NULL columns (entire column NULL, not JSON `null` literal). Use `sqlNullCount` for explicit count\n- \u26D4 **Object-only tools**: `diff`, `merge`, `keys`, `indexSuggest`, `securityScan`, `stats`\u2014topKeys require JSONB objects, throw descriptive errors for arrays\n- \u26D4 **Array-only tools**: `insert`\u2014requires JSONB arrays, throws errors for objects\n- \uD83D\uDCDD `normalize` modes: `pairs`/`keys`/`flatten` for objects; `array` for arrays\n- \uD83D\uDCE6 **AI-Optimized Payloads**: `contains` and `pathQuery` default to 100 results. Returns `truncated` + `totalCount` when capped. Use `limit: 0` for all rows\n\n**Top-Level Aliases**: `pg.jsonbExtract()`, `pg.jsonbSet()`, `pg.jsonbInsert()`, `pg.jsonbDelete()`, `pg.jsonbContains()`, `pg.jsonbPathQuery()`, `pg.jsonbAgg()`, `pg.jsonbObject()`, `pg.jsonbArray()`, `pg.jsonbKeys()`, `pg.jsonbStripNulls()`, `pg.jsonbTypeof()`, `pg.jsonbValidatePath()`, `pg.jsonbMerge()`, `pg.jsonbNormalize()`, `pg.jsonbDiff()`, `pg.jsonbIndexSuggest()`, `pg.jsonbSecurityScan()`, `pg.jsonbStats()`\n\n## Stats Tools\n\n- All stats tools support `schema.table` format (auto-parsed, embedded schema takes priority over explicit `schema` param)\n- `timeSeries`: Both `timeColumn` (must be timestamp/date) and `valueColumn` (must be numeric) are validated upfront with clear error messages. Aliases: `time`\u2192`timeColumn`, `value`\u2192`valueColumn`. `interval` accepts: `second`, `minute`, `hour`, `day`, `week`, `month`, `year` (keywords, PostgreSQL format, or plurals). Default `limit: 100` time buckets. Use `limit: 0` for no limit. Returns `truncated` and `totalCount` indicators when default limit is applied. **groupBy payloads**: Default `groupLimit: 20` groups. Returns `truncated` + `totalGroupCount` when groups are limited. Use `groupLimit: 0` for all groups\n- `correlation`: Use `column1`/`column2` or aliases `x`/`y` for column names\n- `distribution`: Returns `skewness`, `kurtosis` (excess). `buckets` must be > 0. **groupBy payloads**: Default `groupLimit: 20` groups (prevents large payloads with many histogram buckets per group). Returns `truncated` + `totalGroupCount` when groups are limited. Use `groupLimit: 0` for all groups\n- `sampling`: Defaults to `random` method with 20 rows (optimized for LLM context). `sampleSize` always takes precedence over `percentage`. \u26A0\uFE0F `percentage` param only works with `bernoulli`/`system` methods\u2014ignored for default `random` method. Default limit of 100 rows applied to `bernoulli`/`system` with `percentage` to prevent large payloads. Returns `truncated` and `totalSampled` when TABLESAMPLE returns more rows than limit\n- `percentiles`: Accepts 0-1 or 0-100 (auto-normalized). \u26A0\uFE0F Use consistent scale\u2014mixing (e.g., `[0.1, 50]`) produces unexpected keys and returns a `warning` field explaining the issue. Empty array \u2192 defaults [0.25, 0.5, 0.75]\n- `hypothesis`: Returns nested `results` object containing `pValue` (two-tailed), `testStatistic`, `interpretation`, `sampleMean`, `sampleStdDev`. Access via `hyp.results.pValue`. Use `populationStdDev` for z-test, otherwise defaults to t-test\n- `regression`: Use `xColumn`/`yColumn`, aliases `x`/`y`, or `column1`/`column2` (for consistency with correlation). Returns nested `regression` object containing `slope`, `intercept`, `rSquared`, `equation`, `avgX`, `avgY`, `sampleSize`. Access via `reg.regression.slope`\n- \u26A0\uFE0F WARNING: `sampling` with `system` method unreliable for small tables\u2014use `bernoulli` or `random`\n\n**Top-Level Aliases**: `pg.descriptive()`, `pg.percentiles()`, `pg.correlation()`, `pg.regression()`, `pg.timeSeries()`, `pg.distribution()`, `pg.hypothesis()`, `pg.sampling()`\n\n## Text Tools\n\n- `pg_text_search`/`pg_text_rank`: Column must be `text` type\u2014pre-built `tsvector` columns are **not** supported (wrap with `to_tsvector()` fails on tsvector input). Use `pg_read_query` with raw FTS SQL for tsvector columns\n- `pg_create_fts_index`: Returns `{success, index, config, skipped}`. `skipped: true` = index already existed (IF NOT EXISTS). `ifNotExists` defaults to `true`\n\n## Performance Tools\n\nCore (24 methods): `explain()`, `explainAnalyze()`, `explainBuffers()`, `indexStats()`, `tableStats()`, `statStatements()`, `statActivity()`, `locks()`, `bloatCheck()`, `cacheHitRatio()`, `seqScanTables()`, `indexRecommendations()`, `queryPlanCompare()`, `baseline()`, `connectionPoolOptimize()`, `partitionStrategySuggest()`, `unusedIndexes()`, `duplicateIndexes()`, `vacuumStats()`, `queryPlanStats()`, `diagnoseDatabasePerformance()`, `detectQueryAnomalies()`, `detectBloatRisk()`, `detectConnectionSpike()`\n\nWrappers (3): `blockingQueries()`\u2192`locks({showBlocked:true})`, `longRunningQueries({ seconds | minDuration }?)` filters by duration (returns `{longRunningQueries, count, threshold}`), `analyzeTable({ table })` runs ANALYZE (accepts `schema.table` format)\n\n- `explain({ sql, format?, params? })`: Supports `format: 'text'|'json'|'yaml'|'xml'`. Default: text. Use `params: [value]` for `$1, $2` placeholders\n- `explainAnalyze({ sql, format?, params? })`: Same format/params options as explain\n- `explainBuffers({ sql, params? })`: Always returns JSON format (includes buffer statistics)\n- `indexRecommendations({ sql?, params? })`: Pass `params: [value]` for parameterized queries (e.g., `sql: 'SELECT * FROM orders WHERE id = $1', params: [5]`)\n- `queryPlanCompare({ query1, query2, params1?, params2? })`: Compare two query plans. Use `params1`/`params2` for parameterized queries\n- `partitionStrategySuggest({ table })`: Accepts `schema.table` format (auto-parsed) or separate `table` + `schema` params\n- \u26A0\uFE0F **Data Type Awareness**: Query literals must match column types exactly\u2014`WHERE sensor_id = 1` (integer), not `'sensor_1'` (string)\n\nAliases: `cacheStats`\u2192`cacheHitRatio`, `queryStats`\u2192`statStatements`, `activity`\u2192`statActivity`, `vacuum`\u2192`vacuumStats`, `indexUsage`\u2192`indexStats`, `bloatEstimate`/`bloat`\u2192`bloatCheck`, `runningQueries`\u2192`longRunningQueries`\n\n\uD83D\uDCE6 **AI-Optimized Payloads**: Tools return limited results by default to reduce context size:\n\n- `indexStats({ limit? })`: Default 50 rows. Returns `truncated: true` + `totalCount` when limited. Use `limit: 0` for all\n- `tableStats({ limit? })`: Default 50 rows. Returns `truncated: true` + `totalCount` when limited. Use `limit: 0` for all\n- `vacuumStats({ limit? })`: Default 50 rows. Same truncation indicators. Use `limit: 0` for all\n- `statStatements({ limit?, orderBy? })`: Default 20 rows. Returns `truncated: true` + `totalCount` when limited. Use `limit: 0` for all\n- `unusedIndexes({ limit?, summary? })`: Default 20 rows. Use `summary: true` for aggregated stats by schema\n- `queryPlanStats({ limit?, truncateQuery? })`: Default 20 rows, queries truncated to 100 chars. Use `truncateQuery: 0` for full text\n\n\uD83D\uDCCD **Code Mode Note**: `pg_performance_baseline` \u2192 `pg.performance.baseline()` (not `performanceBaseline`). `indexRecommendations` accepts `query` alias for `sql`\n\n**Top-Level Aliases**: `pg.explain()`, `pg.explainAnalyze()`, `pg.cacheHitRatio()`, `pg.indexStats()`, `pg.tableStats()`, `pg.indexRecommendations()`, `pg.bloatCheck()`, `pg.vacuumStats()`, `pg.unusedIndexes()`, `pg.duplicateIndexes()`, `pg.seqScanTables()`, `pg.diagnoseDatabasePerformance()`, `pg.detectQueryAnomalies()`, `pg.detectBloatRisk()`, `pg.detectConnectionSpike()`\n\n## Monitoring Tools\n\nCore: `databaseSize()`, `tableSizes()`, `connectionStats()`, `showSettings()`, `capacityPlanning()`, `uptime()`, `serverVersion()`, `recoveryStatus()`, `replicationStatus()`, `resourceUsageAnalyze()`, `alertThresholdSet()`\n\n- `databaseSize()`: Returns `{bytes: number, size: string}`. Optional `database` param for specific db\n- `tableSizes({ limit?, schema? })`: Default limit 50. Returns `{tables: [...], count, truncated?, totalCount?}`. `truncated: true` + `totalCount` when limited. Use `limit: 0` for all\n- `connectionStats()`: Returns `{byDatabaseAndState, totalConnections: number, maxConnections: number}`\n- `showSettings({ setting?, limit? })`: Default limit 50 when no pattern. Returns `{settings: [...], count, truncated?, totalCount?}`. Accepts `pattern`, `setting`, or `name`. Exact names auto-match; `%` for LIKE patterns\n- `capacityPlanning({days: 90})`: `days` = `projectionDays`. Returns `{current, growth, projection, recommendations}` with numeric fields. \u26D4 Negative days rejected\n- `uptime()`: Returns `{start_time: string, uptime: {days, hours, minutes, seconds, milliseconds}}`\n- `serverVersion()`: Returns `{full_version: string, version: string, version_num: number}`\n- `recoveryStatus()`: Returns `{in_recovery: boolean, last_replay_timestamp: string|null}`\n- `replicationStatus()`: Returns `{role: 'primary'|'replica', replicas: [...]}` for primary, or `{role: 'replica', replay_lag, ...}` for replica\n- `resourceUsageAnalyze()`: Returns `{backgroundWriter, checkpoints, connectionDistribution, bufferUsage, activity, analysis}` with all counts as numbers\n- `alertThresholdSet({metric?: 'connection_usage'})`: Returns recommended thresholds. Invalid metric returns `{success: false, error: \"...\"}`. Valid metrics: connection_usage, cache_hit_ratio, replication_lag, dead_tuples, long_running_queries, lock_wait_time\n\n\uD83D\uDCE6 **AI-Optimized Payloads**: Tools return limited results by default to reduce context size:\n\n- `tableSizes({ limit? })`: Default 50 rows. Returns `truncated: true` + `totalCount` when limited. Use `limit: 0` for all\n- `showSettings({ limit? })`: Default 50 rows when no pattern specified. Use `limit: 0` for all or specify a pattern\n\nAliases: `tables`\u2192`tableSizes`, `connections`\u2192`connectionStats`, `settings`/`config`\u2192`showSettings`, `alerts`/`thresholds`\u2192`alertThresholdSet`\n\n**Top-Level Aliases**: `pg.databaseSize()`, `pg.tableSizes()`, `pg.connectionStats()`, `pg.serverVersion()`, `pg.uptime()`, `pg.showSettings()`, `pg.recoveryStatus()`, `pg.replicationStatus()`, `pg.capacityPlanning()`, `pg.resourceUsageAnalyze()`, `pg.alertThresholdSet()`\n\n## Admin Tools\n\nCore: `vacuum()`, `vacuumAnalyze()`, `analyze()`, `reindex()`, `cluster()`, `setConfig()`, `reloadConf()`, `resetStats()`, `cancelBackend()`, `terminateBackend()`\n\n- All admin tools support `schema.table` format (auto-parsed, embedded schema takes priority over explicit `schema` param)\n- `vacuum({ table?, full?, analyze?, verbose? })`: Without `table`, vacuums ALL tables. `verbose` output goes to PostgreSQL server logs\n- `reindex({ target, name?, concurrently? })`: Targets: 'table', 'index', 'schema', 'database'. `database` target defaults to current db when `name` omitted\n- `cluster()`: Without args, re-clusters all previously-clustered tables. With args, requires BOTH `table` AND `index`\n- `setConfig({ name, value, isLocal? })`: `isLocal: true` applies only to current transaction\n- `cancelBackend({ pid })`: Graceful query cancellation\u2014returns `{success: false}` for invalid PID (no error thrown)\n- `terminateBackend({ pid })`: Forceful connection termination\u2014use with caution\n\nAliases: `tableName`\u2192`table`, `indexName`\u2192`index`, `param`/`setting`\u2192`name`, `processId`\u2192`pid`\n\n**Top-Level Aliases**: `pg.vacuum()`, `pg.vacuumAnalyze()`, `pg.analyze()`, `pg.reindex()`, `pg.cluster()`, `pg.setConfig()`, `pg.reloadConf()`, `pg.resetStats()`, `pg.cancelBackend()`, `pg.terminateBackend()`\n\n**Discovery**: `pg.admin.help()` returns `{methods, methodAliases, examples}` object\n\n**Response structures**:\n\n- `vacuum()` / `vacuumAnalyze()`: `{success, message, table?, schema?, hint?}` (hint present when verbose: true)\n- `analyze()`: `{success, message, table?, schema?, columns?}`\n- `reindex()`: `{success, message}`\n- `cluster()`: `{success, message, table?, index?}` (table/index present for table-specific cluster)\n- `setConfig()`: `{success, message, parameter, value}`\n- `reloadConf()` / `resetStats()`: `{success, message}`\n- `cancelBackend()` / `terminateBackend()`: `{success, message}`\n\n## Backup Tools\n\nCore: `dumpTable()`, `dumpSchema()`, `copyExport()`, `copyImport()`, `createBackupPlan()`, `restoreCommand()`, `physical()`, `restoreValidate()`, `scheduleOptimize()`\n\nResponse Structures:\n\n- `dumpTable`: `{ddl, type, note, insertStatements?}` \u2014 `insertStatements` only with `includeData: true` (separate field from `ddl`)\n- `copyExport`: `{data, rowCount, truncated?, limit?}` \u2014 `data` contains CSV/text content. `truncated: true` + `limit` when rows returned equals applied limit (indicating more rows likely exist)\n- `copyImport`: `{command, stdinCommand, notes}` \u2014 Both file and stdin COPY commands\n- `createBackupPlan`: `{strategy: {fullBackup, walArchiving}, estimates}`\n- `restoreCommand`: `{command, warnings?, notes}` \u2014 Warnings when `database` omitted\n- `restoreValidate`: `{note?, validationSteps: [{step, name, command?, commands?, note?}], recommendations}` \u2014 Top-level `note` when `backupType` omitted (defaults to pg_dump). Step-level `note` for non-command steps\n- `physical`: `{command, notes, requirements}`\n- `scheduleOptimize`: `{analysis, recommendation, commands}`\n\n\uD83D\uDCE6 **AI-Optimized Payloads**: `copyExport` limits results to 500 rows by default to prevent large payloads. Use `limit: 0` for all rows, or specify a custom limit.\n\n- `pg_copy_export`: Use `query`/`sql` OR `table`. \u26A0\uFE0F If both provided, `query` takes precedence with warning. Supports `schema.table` format (auto-parsed, takes priority over `schema` param). Format: `csv` (default, comma-delimited), `text` (tab-delimited). Both formats support `header: true` (default). \u26D4 `binary` not supported via MCP\u2014use `pg_dump_schema` for binary exports. Default `limit: 500` (use `0` for all rows). Optional `delimiter` to customize\n- `pg_dump_table`: Returns `ddl` + `insertStatements` when `includeData: true`. Supports sequences (`type: 'sequence'`), views (`type: 'view'`), and partitioned tables (`type: 'partitioned_table'` with `PARTITION BY` clause). **PRIMARY KEYS, INDEXES, CONSTRAINTS NOT included**\u2014use `pg_get_indexes`/`pg_get_constraints`. Supports `schema.table` format\n- `pg_dump_schema`: Generates pg_dump command. Optional `schema`, `table`, `filename`\n- `pg_copy_import`: Generates COPY FROM command. Supports `schema.table` format (auto-parsed, takes priority over `schema` param). `columns` array, `filePath`, `format`, `header`, `delimiter`\n- `pg_restore_command`: Include `database` parameter for complete command. Optional `schemaOnly`, `dataOnly`\n- `pg_create_backup_plan`: Generates backup strategy with cron schedule. `frequency`: 'hourly'|'daily'|'weekly', `retention` count\n- `pg_backup_physical`: Generates pg_basebackup command. `format`: 'plain'|'tar' (default: 'tar'), `checkpoint`: 'fast'|'spread', `compress`: 0-9\n- `pg_restore_validate`: Generates validation commands. `backupType`: 'pg_dump' (default)|'pg_basebackup'\n- `pg_backup_schedule_optimize`: Analyzes database activity patterns and recommends optimal backup schedule\n\n**Top-Level Aliases**: `pg.dumpTable()`, `pg.dumpSchema()`, `pg.copyExport()`, `pg.copyImport()`, `pg.createBackupPlan()`, `pg.restoreCommand()`, `pg.restoreValidate()`, `pg.physical()`, `pg.backupPhysical()`, `pg.scheduleOptimize()`, `pg.backupScheduleOptimize()`\n\n## Text Tools\n\nDefaults: `threshold`=0.3 (use 0.1-0.2 for partial), `maxDistance`=3 (use 5+ for longer strings)\n\n- All text tools support `schema.table` format (auto-parsed, embedded schema takes priority over explicit `schema` param)\n- `pg_text_search`: Supports both `column` (singular string) and `columns` (array). Either is valid\u2014`column` auto-converts to array\n- \uD83D\uDCE6 **AI-Optimized Payloads**: All row-returning text tools (`pg_text_search`, `pg_text_rank`, `pg_text_headline`, `pg_trigram_similarity`, `pg_fuzzy_match`, `pg_regexp_match`, `pg_like_search`) default to 100 results. Returns `truncated: true` + `hint` when capped. Use `limit: 0` for all rows\n- `pg_fuzzy_match`: Levenshtein returns distance (lower=better). Soundex/metaphone return phonetic codes (exact match only). \u26D4 Invalid `method` values throw error with valid options\n- `pg_text_normalize`: Removes accents only (unaccent). Does NOT lowercase/trim\n- \uD83D\uDCCD **Table vs Standalone**: `normalize`, `sentiment`, `toVector`, `toQuery`, `searchConfig` are standalone (text input only). For phonetic matching: use `pg_fuzzy_match` with `method: 'soundex'|'metaphone'` (direct MCP), or `pg.text.soundex()`/`pg.text.metaphone()` (Code Mode convenience wrappers that call fuzzyMatch internally)\n\n**Top-Level Aliases**: `pg.textSearch()`, `pg.textRank()`, `pg.textHeadline()`, `pg.textNormalize()`, `pg.textSentiment()`, `pg.textToVector()`, `pg.textToQuery()`, `pg.textSearchConfig()`, `pg.textTrigramSimilarity()`, `pg.textFuzzyMatch()`, `pg.textLikeSearch()`, `pg.textRegexpMatch()`, `pg.textCreateFtsIndex()`\n\n## Schema Tools\n\nCore: `listSchemas()`, `createSchema()`, `dropSchema()`, `listViews()`, `createView()`, `dropView()`, `listSequences()`, `createSequence()`, `dropSequence()`, `listFunctions()`, `listTriggers()`, `listConstraints()`\n\nResponse Structures:\n\n- `listSchemas()`: `{schemas: string[], count}`\n- `listViews({ includeMaterialized?, truncateDefinition?, limit?, schema? })`: `{views: [{schema, name, type, definition, definitionTruncated?}], count, hasMatViews, truncatedDefinitions?, truncated, totalCount?, note?}`. Default `limit: 50` (use `0` for all). Default `truncateDefinition: 500` chars (use `0` for full definitions). `truncated` always included (`true`/`false`). `totalCount` included when truncated. \u26A0\uFE0F Validates schema existence\u2014nonexistent schema returns `{success: false, error: \"...\"}`\n- `listSequences({ schema?, limit? })`: `{sequences: [{schema, name, owned_by}], count, truncated, totalCount?, note?}`. Default `limit: 50` (use `0` for all). Returns `truncated: true` + `totalCount` when results are limited. \u26A0\uFE0F Validates schema existence\u2014nonexistent schema returns `{success: false, error: \"...\"}`. Note: `owned_by` omits `public.` prefix for sequences in public schema (e.g., `users.id` not `public.users.id`)\n- `listFunctions({ schema?, limit?, exclude? })`: `{functions: [{schema, name, arguments, returns, language, volatility}], count, limit}`\n- `listTriggers({ schema?, table? })`: `{triggers: [{schema, table_name, name, timing, events, function_name, enabled}], count}`\n- `listConstraints({ schema?, table?, type? })`: `{constraints: [{schema, table_name, name, type, definition}], count}`. Type filter values: `primary_key`, `foreign_key`, `unique`, `check`. Returned `type` field uses matching human-readable names\n- `dropSchema/dropView/dropSequence`: All return `{existed: true/false}` to indicate if object existed before drop\n- `createSchema/createSequence` (with `ifNotExists`) and `createView` (with `orReplace`): Return `{alreadyExisted: true/false}` when the flag is set. Without `ifNotExists`/`orReplace`, the field is omitted\n\n- `pg_create_view`: Supports `schema.name` format (auto-parsed). Use `orReplace: true` for CREATE OR REPLACE. `checkOption`: 'cascaded', 'local', 'none'. \u26D4 OR REPLACE can add new columns but cannot rename/remove existing ones\u2014PostgreSQL limitation\n- `pg_create_sequence`: Supports `schema.name` format. Parameters: `start`, `increment`, `minValue`, `maxValue`, `cache`, `cycle`, `ownedBy`, `ifNotExists`\n- `pg_list_functions`: Default limit=500. Use `schema: 'public'`, `limit: 2000`, or `exclude: ['postgis', 'pg_trgm', 'ltree', 'citext', 'fuzzystrmatch', 'pg_stat_statements', 'hypopg', 'unaccent', 'pg_stat_kcache', 'pgcrypto', 'partman', 'vector', 'topology']` to filter. \u26A0\uFE0F `exclude` filters by **schema name** AND extension-owned functions. The `language` filter does NOT exclude extension functions\u2014use `exclude` alongside `language` for clean results. Note: Aggressive `exclude` may return 0 results if all functions belong to excluded extensions\n\n\uD83D\uDCE6 **AI-Optimized Payloads**: `listViews({ limit? })` and `listSequences({ limit? })` both default to 50 rows. Returns `truncated: true` + `totalCount` when limited. Use `limit: 0` for all\n\n**Discovery**: `pg.schema.help()` returns `{methods, methodAliases, examples}` object\n\n## Partitioning Tools\n\n- `pg_create_partitioned_table`: `partitionBy` case-insensitive. Supports `schema.table` format for `name` (auto-parsed). `primaryKey` accepts array (e.g., `['id', 'event_date']`). \u26D4 `primaryKey`/`unique` must include partition key\u2014throws validation error otherwise\n- `pg_create_partition`: Use `parent`/`table`/`parentTable`. `forValues` is a raw SQL string: `\"FROM ('2024-01-01') TO ('2024-07-01')\"`, `\"IN ('US', 'CA')\"`, `\"WITH (MODULUS 4, REMAINDER 0)\"`. For DEFAULT partition, use `isDefault: true`. Supports `schema.table` format for `parent` (auto-parsed)\n- `pg_attach_partition`/`pg_detach_partition`: Support `schema.table` format for `parent` and `partition` (auto-parsed). For DEFAULT partition, use `isDefault: true` or `forValues: \"DEFAULT\"`\n- `pg_list_partitions`: Default `limit: 50` (use `0` for all). Returns `{partitions, count, truncated, totalCount?}`. Uses `bounds` field (consistent with `pg_partition_info`)\n- `pg_partition_info`: Returns `{tableInfo, partitions, totalSizeBytes}`. Uses `bounds` field\n- Both list/info tools support `schema.table` format (auto-parsed) and accept `table`, `parent`, `parentTable`, or `name` aliases\n- Response structures: `pg_create_partitioned_table` \u2192 `{success, table, partitionBy, partitionKey, primaryKey?}`. `pg_create_partition` \u2192 `{success, partition, parent, bounds, subpartitionBy?, subpartitionKey?}`. `pg_attach_partition` \u2192 `{success, parent, partition, bounds}`. `pg_detach_partition` \u2192 `{success, parent, partition}`\n- \u26A0\uFE0F Sub-partitioning: `subpartitionBy`/`subpartitionKey` on `pg_create_partition` makes a partition itself partitionable. The parent's `primaryKey` must include the sub-partition key column (PostgreSQL constraint)\n- \uD83D\uDCCD Code Mode: `pg.partitioning.create()` = `createPartition`, NOT `createPartitionedTable`\n\n## pg_partman Tools\n\n- `pg_partman_create_parent`: Interval uses PostgreSQL syntax ('1 day', '1 month') NOT keywords ('daily'). `startPartition` accepts 'now' shorthand for current date. Required params: `parentTable`/`table`, `controlColumn`/`control`/`column`, `interval`\n- `pg_partman_run_maintenance`: Without `parentTable`, maintains ALL partition sets. Returns `partial: true` when some tables are skipped. `orphaned` object groups orphaned configs with `count`, `tables`, and cleanup `hint`. `errors` array for other failures\n- `pg_partman_show_config`: Default `limit: 50` (use `0` for all). Returns `truncated` + `totalCount` when limited. `orphaned` flag per config. Supports `schema.table` or plain table name (auto-prefixes `public.`)\n- `pg_partman_show_partitions`: Default `limit: 50` (use `0` for all). Returns `truncated` + `totalCount` when limited. `parentTable` required. Supports `schema.table` format (auto-parsed)\n- `pg_partman_check_default`/`partition_data`: `parentTable` required. Supports `schema.table` format (auto-parsed)\n- `pg_partman_set_retention`: \u26A0\uFE0F **CAUTION: Default is DROP** \u2014 `retentionKeepTable: false` (default) = DROP partitions, `true` = detach only (safer). Pass `retention: null` to disable retention\n- `pg_partman_undo_partition`: `targetTable` MUST exist before calling. Requires both `parentTable` and `targetTable`/`target`. \u26A0\uFE0F Parent table and child partitions remain after undo\u2014use `DROP TABLE parent CASCADE` to clean up\n- `pg_partman_analyze_partition_health`: Default `limit: 50` (use `0` for all). Returns `truncated` + `totalCount` when limited. `summary.overallHealth`: 'healthy'|'warnings'|'issues_found'\n- \uD83D\uDCDD **Schema Resolution**: All partman tools auto-prefix `public.` when no schema specified in `parentTable`\n- \uD83D\uDCDD **Aliases**: `parentTable` accepts `table`, `parent`, `name`. `controlColumn` accepts `control`, `column`. `targetTable` accepts `target`\n\n## pg_stat_kcache Tools\n\nCore: `createExtension()`, `queryStats()`, `topCpu()`, `topIo()`, `databaseStats()`, `resourceAnalysis()`, `reset()`\n\n- `pg_kcache_query_stats`: Default `limit: 20` (use `0` for all). Returns `truncated` + `totalCount` when limited. `orderBy`: 'total_time' (default), 'cpu_time', 'reads', 'writes'. `queryPreviewLength`: chars for query preview (default: 100, max: 500, 0 for full). \u26D4 'calls' NOT valid for orderBy\u2014use `minCalls` param\n- `pg_kcache_resource_analysis`: Default `limit: 20` (use `0` for all). Returns `truncated` + `totalCount` when limited. `minCalls`, `queryPreviewLength` supported. Classifies queries as 'CPU-bound', 'I/O-bound', or 'Balanced'\n- `pg_kcache_top_cpu`: Top CPU-consuming queries. `limit` param (default: 10). `queryPreviewLength`: chars for query preview (default: 100, max: 500, 0 for full). Returns `truncated` + `totalCount` when limited\n- `pg_kcache_top_io`: `type`/`ioType` (alias): 'reads', 'writes', 'both' (default). `limit` param (default: 10). `queryPreviewLength`: chars for query preview (default: 100, max: 500, 0 for full). Returns `truncated` + `totalCount` when limited\n- `pg_kcache_database_stats`: Aggregated CPU/IO stats per database. Optional `database` param to filter specific db\n- `pg_kcache_reset`: Resets pg_stat_kcache AND pg_stat_statements statistics\n\n## citext Tools\n\nCore: `createExtension()`, `convertColumn()`, `listColumns()`, `analyzeCandidates()`, `compare()`, `schemaAdvisor()`\n\n- `pg_citext_create_extension`: Enable citext extension (idempotent). Returns `{success, message, usage}`\n- `pg_citext_convert_column`: Supports `schema.table` format (auto-parsed). \u26D4 Only allows text-based columns (text, varchar, character varying)\u2014non-text columns return `{success: false, error, allowedTypes, suggestion}`. When views depend on column, returns `{success: false, dependentViews, hint}`\u2014drop/recreate views manually. `col` alias for `column`. Returns `{previousType}` showing original type\n- `pg_citext_list_columns`: Default `limit: 100` (use `0` for all). Returns `{columns: [{table_schema, table_name, column_name, is_nullable, column_default}], count, totalCount, truncated}`. Optional `schema`, `limit` filters\n- `pg_citext_analyze_candidates`: Default `limit: 50` (use `0` for all). Default `excludeSystemSchemas: true` filters out extension schemas (cron, topology, partman, tiger) when no `schema`/`table` filter specified\u2014use `excludeSystemSchemas: false` to include all. Returns `truncated: true` + `totalCount` when results are limited. Scans tables for TEXT/VARCHAR columns matching common patterns (email, username, name, etc.). Optional `schema`, `table`, `limit`, `excludeSystemSchemas`, `patterns` filters. Returns `{candidates, count, totalCount, truncated, summary: {highConfidence, mediumConfidence}, recommendation, patternsUsed, excludedSchemas?}`\n- `pg_citext_compare`: Test case-insensitive comparison. Returns `{value1, value2, citextEqual, textEqual, lowerEqual, extensionInstalled}`\n- `pg_citext_schema_advisor`: Supports `schema.table` format (auto-parsed). Analyzes specific table. Returns `{table, recommendations: [{column, currentType, previousType?, recommendation, confidence, reason}], summary, nextSteps}`. `tableName` alias for `table`. Already-citext columns include `previousType: \"text or varchar (converted)\"`\n\n**Discovery**: `pg.citext.help()` returns `{methods, methodAliases, examples}` object\n\n## ltree Tools\n\nCore: `createExtension()`, `query()`, `match()`, `subpath()`, `lca()`, `listColumns()`, `convertColumn()`, `createIndex()`\n\n- `pg_ltree_create_extension`: Enable ltree extension (idempotent). Returns `{success, message}`\n- `pg_ltree_query`: Query hierarchical relationships. Supports `schema.table` format (auto-parsed). `mode`/`type`: 'ancestors', 'descendants' (default), 'exact'. Returns `{results, count, path, mode, isPattern}`. \u26A0\uFE0F Validates column is ltree type\u2014returns clear error for non-ltree columns\n- `pg_ltree_match`: Match paths using lquery pattern syntax (`*`, `*{1,2}`, `*.label.*`). Supports `schema.table` format. `pattern`/`lquery`/`query` aliases. Returns `{results, count, pattern}`\n- `pg_ltree_subpath`: Extract portion of ltree path. `offset`/`start`/`from` and `length`/`len` aliases. Negative `offset` counts from end. \u26A0\uFE0F Returns `{success: false, error, pathDepth}` for invalid offset (validated before PostgreSQL call)\n- `pg_ltree_lca`: Find longest common ancestor of multiple paths. Requires `paths` array (min 2). Returns `{longestCommonAncestor, hasCommonAncestor: bool, paths}`\n- `pg_ltree_list_columns`: List all ltree columns in database. Optional `schema` filter. Returns `{columns: [{table_schema, table_name, column_name, is_nullable, column_default}], count}`\n- `pg_ltree_convert_column`: Convert TEXT column to ltree. Supports `schema.table` format. `col` alias for `column`. Returns `{previousType}`. \u26A0\uFE0F When views depend on column, returns `{success: false, dependentViews, hint}`\u2014drop/recreate views manually\n- `pg_ltree_create_index`: Create GiST index on ltree column. Supports `schema.table` format. Auto-generates index name if `indexName` omitted. Returns `{indexName, indexType: 'gist', alreadyExists?}`\n\n**Discovery**: `pg.ltree.help()` returns `{methods, methodAliases, examples}` object. Top-level aliases available: `pg.ltreeQuery()`, `pg.ltreeMatch()`, etc.\n\n## PostGIS Tools\n\n**Geometry Creation:**\n\n- `pg_geocode`: Create point geometry from lat/lng. Returns `{geojson, wkt}`. \u26A0\uFE0F Validates bounds: lat \u00B190\u00B0, lng \u00B1180\u00B0\n- `pg_geometry_column`: Add geometry column to table. `ifNotExists` returns `{alreadyExists: true}`\n- `pg_spatial_index`: Create GiST spatial index. Auto-generates name if not provided. `ifNotExists` supported\n\n**Spatial Queries:**\n\n- `pg_distance`: Find geometries within distance from point. Returns `{results, count}` with `distance_meters`. \u26A0\uFE0F Validates point bounds\n- `pg_bounding_box`: Find geometries within lat/lng bounding box. Use `select` array for specific columns\n- `pg_intersection`: Find geometries intersecting a WKT/GeoJSON geometry. Auto-detects SRID from column\n- `pg_point_in_polygon`: Check if point is within table polygons. Returns `{containingPolygons, count}`. \u26A0\uFE0F Validates point bounds\n\n**Geometry Operations (Table-based):**\n\n- `pg_buffer`: Create buffer zone around table geometries. Default limit: 50 rows. Default simplify: 10m (set `simplify: 0` to disable). Returns `truncated: true` + `totalCount` when results are truncated. Use `limit: 0` for all rows\n- `pg_geo_transform`: Transform table geometries between SRIDs. Default limit: 50 rows. Returns `truncated: true` + `totalCount` when results are truncated. Use `limit: 0` for all rows. Auto-detects `fromSrid` from column metadata if not provided (returns `autoDetectedSrid: true`). `fromSrid`/`sourceSrid` and `toSrid`/`targetSrid` aliases\n- `pg_geo_cluster`: Spatial clustering (DBSCAN/K-Means). K-Means: If `numClusters` exceeds row count, automatically clamps to available rows with `warning` field. DBSCAN: Returns contextual `hints` array explaining parameter effects (e.g., \"All points formed single cluster\u2014decrease eps\") and `parameterGuide` explaining eps/minPoints trade-offs\n\n**Geometry Operations (Standalone WKT/GeoJSON):**\n\n- `pg_geometry_buffer`: Create buffer around WKT/GeoJSON. Returns `{buffer_geojson, buffer_wkt, distance_meters}`. Optional `simplify` param (meters) reduces polygon complexity\u2014returns `simplified`, `simplifyTolerance` when applied. \u26A0\uFE0F Returns `warning` if simplify tolerance is too high and geometry collapses to null\n- `pg_geometry_transform`: Transform WKT/GeoJSON between SRIDs. Returns `{transformed_geojson, transformed_wkt, fromSrid, toSrid}`\n- `pg_geometry_intersection`: Compute intersection of two geometries. Returns `{intersects, intersection_geojson, intersection_area_sqm}`. Normalizes SRID (4326) automatically\u2014safe to mix GeoJSON and WKT\n\n**Administration:**\n\n- `pg_postgis_create_extension`: Enable PostGIS extension (idempotent)\n- `pg_geo_index_optimize`: Analyze spatial indexes. Without `table` param, analyzes all spatial indexes\n\n**Code Mode Aliases:** `pg.postgis.addColumn()` \u2192 `geometryColumn`, `pg.postgis.indexOptimize()` \u2192 `geoIndexOptimize`, `pg.postgis.geoCluster()` \u2192 `pg_geo_cluster`, `pg.postgis.geoTransform()` \u2192 `pg_geo_transform`. Note: `pg.{group}.help()` returns `{methods, methodAliases, examples}`\n\n## Cron Tools (pg_cron)\n\nCore: `createExtension()`, `schedule()`, `scheduleInDatabase()`, `unschedule()`, `alterJob()`, `listJobs()`, `jobRunDetails()`, `cleanupHistory()`\n\n- `pg_cron_schedule`: Schedule a cron job. `schedule` supports standard cron (`0 5 * * *`) or interval (`1 second` to `59 seconds`). \u26A0\uFE0F Interval syntax only works for 1-59 seconds\u2014for 60+ seconds, use cron syntax (e.g., `* * * * *` for every minute). Use `name`/`jobName` for identification. `command`/`sql`/`query` aliases supported. Note: pg_cron allows duplicate job names; use unique names to avoid confusion when unscheduling\n- `pg_cron_schedule_in_database`: Schedule job in specific database. `database`/`db` aliases. Optional `username`, `active` params\n- `pg_cron_unschedule`: Remove job by `jobId` or `jobName`. If both provided, `jobName` takes precedence (with warning)\n- `pg_cron_alter_job`: Modify existing job. Can change `schedule`, `command`, `database`, `username`, `active`. \u26D4 Non-existent jobId returns error\n- `pg_cron_list_jobs`: List all jobs. Default `limit: 50` (use `0` for all). Optional `active` boolean filter. Returns `truncated` + `totalCount` when limited. Returns `hint` when jobs have no name\n- `pg_cron_job_run_details`: View execution history. Default `limit: 50`. Optional `jobId`, `status` ('running'|'succeeded'|'failed') filters. Returns `truncated` + `totalCount` when limited. Returns `summary` with counts\n- `pg_cron_cleanup_history`: Delete old run records. `olderThanDays`/`days` param (default: 7). Optional `jobId` to target specific job\n- `pg_cron_create_extension`: Enable pg_cron extension (idempotent). Requires superuser\n\n**Discovery**: `pg.cron.help()` returns `{methods, methodAliases, examples}` object\n\n## pgcrypto Tools\n\nCore: `createExtension()`, `hash()`, `hmac()`, `encrypt()`, `decrypt()`, `genRandomUuid()`, `genRandomBytes()`, `genSalt()`, `crypt()`\n\n- `pg_pgcrypto_create_extension`: Enable pgcrypto extension (idempotent). Returns `{success, message}`\n- `pg_pgcrypto_hash`: Hash data using digest algorithms. `algorithm`: 'md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512'. `encoding`: 'hex' (default), 'base64'. Returns `{hash, algorithm, encoding, inputLength}`\n- `pg_pgcrypto_hmac`: HMAC authentication. Same algorithms as hash. Returns `{hmac, algorithm, encoding}`. `key` param for secret\n- `pg_pgcrypto_encrypt`: PGP symmetric encryption. `data` + `password`/`key` (aliases). Optional `options` for cipher config (e.g., 'cipher-algo=aes256'). Returns `{encrypted, encoding: 'base64'}`\n- `pg_pgcrypto_decrypt`: Decrypt PGP-encrypted data. `encryptedData`/`data` + `password`/`key` (aliases). Returns `{decrypted, verified}`. \u26D4 Throws on wrong key/corrupt data\n- `pg_pgcrypto_gen_random_uuid`: Generate UUID v4. Optional `count` (1-100, default 1). Returns `{uuid, uuids, count}` (`uuid` convenience property for single requests)\n- `pg_pgcrypto_gen_random_bytes`: Generate random bytes. `length` (1-1024). `encoding`: 'hex' (default), 'base64'. Returns `{randomBytes, length, encoding}`\n- `pg_pgcrypto_gen_salt`: Generate salt for crypt(). `type`: 'bf' (bcrypt, recommended), 'md5', 'xdes', 'des'. Optional `iterations` for bf (4-31) or xdes. Returns `{salt, type}`\n- `pg_pgcrypto_crypt`: Hash password with salt. Use stored hash as salt for verification. Returns `{hash, algorithm}`. Verification: `crypt(password, storedHash).hash === storedHash`\n\n**Password Workflow**: 1) `genSalt({type:'bf', iterations:10})` \u2192 2) `crypt({password, salt})` \u2192 store hash \u2192 3) Verify: `crypt({password, salt: storedHash})` and compare hashes\n\n**Top-Level Aliases**: `pg.pgcryptoHash()`, `pg.pgcryptoEncrypt()`, `pg.pgcryptoDecrypt()`, `pg.pgcryptoGenRandomUuid()`, etc.\n\n**Discovery**: `pg.pgcrypto.help()` returns `{methods, methodAliases, examples}` object\n\n## Code Mode Sandbox\n\nNo `setTimeout`, `setInterval`, `fetch`, or network access. Use `pg.core.readQuery()` for data access.\n\n\uD83D\uDCCA **Metrics Note**: `memoryUsedMb` measures heap delta (end - start). Negative values indicate memory freed during execution (e.g., GC ran).\n\n## Transactions\n\nCore: `begin()`, `status()`, `commit()`, `rollback()`, `savepoint()`, `rollbackTo()`, `release()`, `execute()`\n\n**Transaction Lifecycle:**\n\n- `pg_transaction_begin`: Start new transaction. Returns `{transactionId, isolationLevel, message}`. Use `transactionId` for subsequent operations\n- `pg_transaction_status`: Check transaction state without modifying it. Returns `{status, transactionId, active, message}`. `status` is `\"active\"` (ready), `\"aborted\"` (needs rollback), or `\"not_found\"` (already ended). Read-only \u2014 does not alter transaction state. `transactionId`/`tx`/`txId` aliases\n- `pg_transaction_commit`: Commit transaction, making all changes permanent. `transactionId`/`tx`/`txId` aliases\n- `pg_transaction_rollback`: Rollback transaction, discarding all changes. `transactionId`/`tx`/`txId` aliases\n\n**Savepoints:**\n\n- `pg_transaction_savepoint`: Create savepoint within transaction. `name`/`savepoint` + `transactionId`/`tx`/`txId`\n- `pg_transaction_rollback_to`: Rollback to savepoint, restoring database state to when the savepoint was created. \u26A0\uFE0F Undoes ALL work (data changes AND savepoints) created after the target savepoint\n- `pg_transaction_release`: Release savepoint, keeping all changes since it was created. `name`/`savepoint` aliases\n\n**Atomic Execution:**\n\n- `pg_transaction_execute`: Execute multiple statements atomically. Two modes:\n - **Auto-commit**: Without `transactionId`\u2014auto-commits on success, auto-rollbacks on any error\n - **Join existing**: With `transactionId`/`tx`/`txId`\u2014no auto-commit, caller controls via commit/rollback\n- `statements`: Array of `{sql: \"...\", params?: [...]}` objects. \u26A0\uFE0F Each object MUST have `sql` key\n- `isolationLevel`: Optional isolation level for new transactions ('READ COMMITTED', 'REPEATABLE READ', 'SERIALIZABLE')\n- Supports SELECT statements inside `statements`\u2014results include `rows` in the response for mixed read/write workflows\n\n**Aborted Transaction State:**\n\n- \u26A0\uFE0F If any statement in a transaction fails, PostgreSQL puts the transaction into an **aborted state**\n- In aborted state, only `ROLLBACK` or `ROLLBACK TO SAVEPOINT` commands are accepted\u2014all other commands will error\n- Use `pg_transaction_rollback` to end the transaction, or `pg_transaction_rollback_to` to recover to a savepoint\n- `pg_transaction_commit` on an aborted transaction will detect the state and report it (not silently rollback)\n\n**Response Structures:**\n\n- `begin`: `{transactionId, isolationLevel: 'READ COMMITTED', message}`\n- `status`: `{status: 'active'|'aborted'|'not_found', transactionId, active, message}`\n- `commit/rollback`: `{success, transactionId, message}`\n- `savepoint/release/rollbackTo`: `{success, transactionId, savepoint, message}`\n- `execute`: `{success, statementsExecuted, results: [{sql, rowsAffected, rowCount, rows?}], transactionId?}`\n\n**Discovery**: `pg.transactions.help()` returns `{methods, methodAliases, examples}`\n\n## Introspection Tools\n\nCode Mode: `pg.introspection.*` \u2014 6 read-only tools for schema analysis.\nCore: `dependencyGraph()`, `topologicalSort()`, `cascadeSimulator()`, `schemaSnapshot()`, `constraintAnalysis()`, `migrationRisks()`\n\n**Schema Analysis (6 tools):**\n\n- `pg_dependency_graph`: FK dependency graph with cycle detection, row counts, edge annotations (CASCADE, RESTRICT, SET NULL, SET DEFAULT, NO ACTION). Params: `schema?`, `includeRowCounts?` (default: true), `excludeExtensionSchemas?` (default: true, excludes cron/topology/tiger/tiger_data)\n- `pg_topological_sort`: Safe DDL execution order via Kahn's algorithm. `direction: 'create'` (default) = dependencies first; `direction: 'drop'` = dependents first. `excludeExtensionSchemas?` (default: true). Self-referencing FKs are filtered (don't affect ordering)\n- `pg_cascade_simulator`: Simulates DELETE/DROP/TRUNCATE impact with cascade path tracing. `operation`: 'DELETE' (default), 'DROP', 'TRUNCATE'. \u26A0\uFE0F DROP/TRUNCATE force-cascade regardless of FK ON DELETE rule \u2192 always `severity: 'critical'` when dependent tables exist. Returns `{sourceTable, operation, affectedTables, severity, stats}`. Stats include `blockingActions` (NO ACTION + RESTRICT FKs that would prevent the operation)\n- `pg_schema_snapshot`: Full schema snapshot in one call. `sections?`: `['tables','views','indexes','constraints','functions','triggers','sequences','types','extensions']` to limit output. `compact?`: `true` to omit per-column details from tables section for reduced payload (use `pg_describe_table` to drill into specific tables). `excludeExtensionSchemas?` (default: true): excludes cron, topology, tiger, tiger_data schemas. `schema?`: filter to specific schema. Returns `{snapshot, stats, generatedAt, compact?}`\n- `pg_constraint_analysis`: Identifies constraint issues. `checks?`: `['redundant','missing_fk','missing_not_null','missing_pk','unindexed_fk']`. Returns `{findings, summary}`\n- `pg_migration_risks`: Static DDL risk assessment. \u26A0\uFE0F Does NOT validate object existence\u2014analyzes SQL patterns only. Returns `{risks, summary}`\n\n**Discovery**: `pg.introspection.help()` returns `{methods, methodAliases, examples}`\n\n## Migration Tools\n\nCode Mode: `pg.migration.*` \u2014 6 tools for schema migration tracking and management.\nCore: `init()`, `record()`, `apply()`, `rollback()`, `history()`, `status()`\n\n- `pg_migration_init`: Initialize/verify `_mcp_schema_versions` tracking table (idempotent). Returns `{success, tableCreated, tableName, existingRecords}`\n- `pg_migration_record`: Record a migration with SHA-256 hash dedup. \u26A0\uFE0F Records metadata only\u2014does NOT execute the SQL (status: 'recorded'). Use `pg_migration_apply` instead for complete migrations (status: 'applied'). Params: `version`, `description?`, `migrationSql`, `rollbackSql?`, `sourceSystem?`. Returns `{success, record}`\n- `pg_migration_apply`: Execute migration SQL and record it atomically in a single transaction. On failure, rolls back and records status as 'failed'. Same params as `pg_migration_record`. Returns `{success, record}` or `{success: false, error}`\n- `pg_migration_rollback`: Execute stored rollback SQL in a transaction. `dryRun: true` previews without executing (default: `false` \u2014 executes immediately). Lookup by `id` or `version`. Returns `{success, dryRun, rollbackSql, record}`\n- `pg_migration_history`: Query migration history with `status?` ('applied'|'recorded'|'rolled_back'|'failed'), `sourceSystem?`, `limit?`, `offset?`. Returns `{records, total, limit, offset}`\n- `pg_migration_status`: Aggregate dashboard. Returns `{initialized, latestVersion, counts, sourceSystems}`\n\n**Discovery**: `pg.migration.help()` returns `{methods, methodAliases, examples}`\n";
17
17
  //# sourceMappingURL=ServerInstructions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ServerInstructions.d.ts","sourceRoot":"","sources":["../../src/constants/ServerInstructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,4lkEAoe/B,CAAC"}
1
+ {"version":3,"file":"ServerInstructions.d.ts","sourceRoot":"","sources":["../../src/constants/ServerInstructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,q3lEA2e/B,CAAC"}
@@ -148,7 +148,7 @@ export const SERVER_INSTRUCTIONS = `# postgres-mcp Code Mode
148
148
 
149
149
  ## Performance Tools
150
150
 
151
- Core (20 methods): \`explain()\`, \`explainAnalyze()\`, \`explainBuffers()\`, \`indexStats()\`, \`tableStats()\`, \`statStatements()\`, \`statActivity()\`, \`locks()\`, \`bloatCheck()\`, \`cacheHitRatio()\`, \`seqScanTables()\`, \`indexRecommendations()\`, \`queryPlanCompare()\`, \`baseline()\`, \`connectionPoolOptimize()\`, \`partitionStrategySuggest()\`, \`unusedIndexes()\`, \`duplicateIndexes()\`, \`vacuumStats()\`, \`queryPlanStats()\`
151
+ Core (24 methods): \`explain()\`, \`explainAnalyze()\`, \`explainBuffers()\`, \`indexStats()\`, \`tableStats()\`, \`statStatements()\`, \`statActivity()\`, \`locks()\`, \`bloatCheck()\`, \`cacheHitRatio()\`, \`seqScanTables()\`, \`indexRecommendations()\`, \`queryPlanCompare()\`, \`baseline()\`, \`connectionPoolOptimize()\`, \`partitionStrategySuggest()\`, \`unusedIndexes()\`, \`duplicateIndexes()\`, \`vacuumStats()\`, \`queryPlanStats()\`, \`diagnoseDatabasePerformance()\`, \`detectQueryAnomalies()\`, \`detectBloatRisk()\`, \`detectConnectionSpike()\`
152
152
 
153
153
  Wrappers (3): \`blockingQueries()\`→\`locks({showBlocked:true})\`, \`longRunningQueries({ seconds | minDuration }?)\` filters by duration (returns \`{longRunningQueries, count, threshold}\`), \`analyzeTable({ table })\` runs ANALYZE (accepts \`schema.table\` format)
154
154
 
@@ -173,7 +173,7 @@ Aliases: \`cacheStats\`→\`cacheHitRatio\`, \`queryStats\`→\`statStatements\`
173
173
 
174
174
  📍 **Code Mode Note**: \`pg_performance_baseline\` → \`pg.performance.baseline()\` (not \`performanceBaseline\`). \`indexRecommendations\` accepts \`query\` alias for \`sql\`
175
175
 
176
- **Top-Level Aliases**: \`pg.explain()\`, \`pg.explainAnalyze()\`, \`pg.cacheHitRatio()\`, \`pg.indexStats()\`, \`pg.tableStats()\`, \`pg.indexRecommendations()\`, \`pg.bloatCheck()\`, \`pg.vacuumStats()\`, \`pg.unusedIndexes()\`, \`pg.duplicateIndexes()\`, \`pg.seqScanTables()\`
176
+ **Top-Level Aliases**: \`pg.explain()\`, \`pg.explainAnalyze()\`, \`pg.cacheHitRatio()\`, \`pg.indexStats()\`, \`pg.tableStats()\`, \`pg.indexRecommendations()\`, \`pg.bloatCheck()\`, \`pg.vacuumStats()\`, \`pg.unusedIndexes()\`, \`pg.duplicateIndexes()\`, \`pg.seqScanTables()\`, \`pg.diagnoseDatabasePerformance()\`, \`pg.detectQueryAnomalies()\`, \`pg.detectBloatRisk()\`, \`pg.detectConnectionSpike()\`
177
177
 
178
178
  ## Monitoring Tools
179
179
 
@@ -434,11 +434,12 @@ No \`setTimeout\`, \`setInterval\`, \`fetch\`, or network access. Use \`pg.core.
434
434
 
435
435
  ## Transactions
436
436
 
437
- Core: \`begin()\`, \`commit()\`, \`rollback()\`, \`savepoint()\`, \`rollbackTo()\`, \`release()\`, \`execute()\`
437
+ Core: \`begin()\`, \`status()\`, \`commit()\`, \`rollback()\`, \`savepoint()\`, \`rollbackTo()\`, \`release()\`, \`execute()\`
438
438
 
439
439
  **Transaction Lifecycle:**
440
440
 
441
441
  - \`pg_transaction_begin\`: Start new transaction. Returns \`{transactionId, isolationLevel, message}\`. Use \`transactionId\` for subsequent operations
442
+ - \`pg_transaction_status\`: Check transaction state without modifying it. Returns \`{status, transactionId, active, message}\`. \`status\` is \`"active"\` (ready), \`"aborted"\` (needs rollback), or \`"not_found"\` (already ended). Read-only — does not alter transaction state. \`transactionId\`/\`tx\`/\`txId\` aliases
442
443
  - \`pg_transaction_commit\`: Commit transaction, making all changes permanent. \`transactionId\`/\`tx\`/\`txId\` aliases
443
444
  - \`pg_transaction_rollback\`: Rollback transaction, discarding all changes. \`transactionId\`/\`tx\`/\`txId\` aliases
444
445
 
@@ -467,6 +468,7 @@ Core: \`begin()\`, \`commit()\`, \`rollback()\`, \`savepoint()\`, \`rollbackTo()
467
468
  **Response Structures:**
468
469
 
469
470
  - \`begin\`: \`{transactionId, isolationLevel: 'READ COMMITTED', message}\`
471
+ - \`status\`: \`{status: 'active'|'aborted'|'not_found', transactionId, active, message}\`
470
472
  - \`commit/rollback\`: \`{success, transactionId, message}\`
471
473
  - \`savepoint/release/rollbackTo\`: \`{success, transactionId, savepoint, message}\`
472
474
  - \`execute\`: \`{success, statementsExecuted, results: [{sql, rowsAffected, rowCount, rows?}], transactionId?}\`
@@ -475,8 +477,8 @@ Core: \`begin()\`, \`commit()\`, \`rollback()\`, \`savepoint()\`, \`rollbackTo()
475
477
 
476
478
  ## Introspection Tools
477
479
 
478
- Code Mode: \`pg.introspection.*\` — 12 tools for schema analysis and migration tracking.
479
- Core: \`dependencyGraph()\`, \`topologicalSort()\`, \`cascadeSimulator()\`, \`schemaSnapshot()\`, \`constraintAnalysis()\`, \`migrationRisks()\`, \`migrationInit()\`, \`migrationRecord()\`, \`migrationApply()\`, \`migrationRollback()\`, \`migrationHistory()\`, \`migrationStatus()\`
480
+ Code Mode: \`pg.introspection.*\` — 6 read-only tools for schema analysis.
481
+ Core: \`dependencyGraph()\`, \`topologicalSort()\`, \`cascadeSimulator()\`, \`schemaSnapshot()\`, \`constraintAnalysis()\`, \`migrationRisks()\`
480
482
 
481
483
  **Schema Analysis (6 tools):**
482
484
 
@@ -487,15 +489,20 @@ Core: \`dependencyGraph()\`, \`topologicalSort()\`, \`cascadeSimulator()\`, \`sc
487
489
  - \`pg_constraint_analysis\`: Identifies constraint issues. \`checks?\`: \`['redundant','missing_fk','missing_not_null','missing_pk','unindexed_fk']\`. Returns \`{findings, summary}\`
488
490
  - \`pg_migration_risks\`: Static DDL risk assessment. ⚠️ Does NOT validate object existence—analyzes SQL patterns only. Returns \`{risks, summary}\`
489
491
 
490
- **Migration Tracking (6 tools):**
492
+ **Discovery**: \`pg.introspection.help()\` returns \`{methods, methodAliases, examples}\`
493
+
494
+ ## Migration Tools
495
+
496
+ Code Mode: \`pg.migration.*\` — 6 tools for schema migration tracking and management.
497
+ Core: \`init()\`, \`record()\`, \`apply()\`, \`rollback()\`, \`history()\`, \`status()\`
491
498
 
492
499
  - \`pg_migration_init\`: Initialize/verify \`_mcp_schema_versions\` tracking table (idempotent). Returns \`{success, tableCreated, tableName, existingRecords}\`
493
- - \`pg_migration_record\`: Record a migration with SHA-256 hash dedup. ⚠️ Records metadata only—does NOT execute the SQL. Use \`pg_migration_apply\` instead for complete migrations. Params: \`version\`, \`description?\`, \`migrationSql\`, \`rollbackSql?\`, \`sourceSystem?\`. Returns \`{success, record}\`
500
+ - \`pg_migration_record\`: Record a migration with SHA-256 hash dedup. ⚠️ Records metadata only—does NOT execute the SQL (status: 'recorded'). Use \`pg_migration_apply\` instead for complete migrations (status: 'applied'). Params: \`version\`, \`description?\`, \`migrationSql\`, \`rollbackSql?\`, \`sourceSystem?\`. Returns \`{success, record}\`
494
501
  - \`pg_migration_apply\`: Execute migration SQL and record it atomically in a single transaction. On failure, rolls back and records status as 'failed'. Same params as \`pg_migration_record\`. Returns \`{success, record}\` or \`{success: false, error}\`
495
502
  - \`pg_migration_rollback\`: Execute stored rollback SQL in a transaction. \`dryRun: true\` previews without executing (default: \`false\` — executes immediately). Lookup by \`id\` or \`version\`. Returns \`{success, dryRun, rollbackSql, record}\`
496
- - \`pg_migration_history\`: Query migration history with \`status?\` ('applied'|'rolled_back'|'failed'), \`sourceSystem?\`, \`limit?\`, \`offset?\`. Returns \`{records, total, limit, offset}\`
503
+ - \`pg_migration_history\`: Query migration history with \`status?\` ('applied'|'recorded'|'rolled_back'|'failed'), \`sourceSystem?\`, \`limit?\`, \`offset?\`. Returns \`{records, total, limit, offset}\`
497
504
  - \`pg_migration_status\`: Aggregate dashboard. Returns \`{initialized, latestVersion, counts, sourceSystems}\`
498
505
 
499
- **Discovery**: \`pg.introspection.help()\` returns \`{methods, methodAliases, examples}\`
506
+ **Discovery**: \`pg.migration.help()\` returns \`{methods, methodAliases, examples}\`
500
507
  `;
501
508
  //# sourceMappingURL=ServerInstructions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ServerInstructions.js","sourceRoot":"","sources":["../../src/constants/ServerInstructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoelC,CAAC"}
1
+ {"version":3,"file":"ServerInstructions.js","sourceRoot":"","sources":["../../src/constants/ServerInstructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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