gradeNot graded
read_sqlAnswer
Returns the DDL currently in the editor (even if it is invalid). The editor holds the COMPLETE Postgres DDL script for the diagram, and it is always run against an empty database: an ALTER only works if the CREATE it modifies is in the same script. Extensions available: pg_trgm, btree_gin, btree_gist, vector. COMMENT ON statements appear in the diagram.
View tool JSON
{
"name": "read_sql",
"kind": "answer",
"impl": "imperative",
"description": "Returns the DDL currently in the editor (even if it is invalid). The editor holds the COMPLETE Postgres DDL script for the diagram, and it is always run against an empty database: an ALTER only works if the CREATE it modifies is in the same script. Extensions available: pg_trgm, btree_gin, btree_gist, vector. COMMENT ON statements appear in the diagram.",
"page": "/webmcp-pglite-erd-diagram/"
}format_sqlAction
Formats Postgres SQL (lower-case keywords) and returns it. Does not change the editor.
View tool JSON
{
"name": "format_sql",
"kind": "act",
"impl": "imperative",
"description": "Formats Postgres SQL (lower-case keywords) and returns it. Does not change the editor.",
"inputSchema": {
"type": "object",
"properties": {
"sql": {
"type": "string",
"description": "The complete DDL script."
}
},
"required": [
"sql"
],
"additionalProperties": false
},
"page": "/webmcp-pglite-erd-diagram/"
}validate_sqlAction
Runs the DDL against a scratch Postgres (nothing is kept) and reports whether it is valid. On failure it throws with the Postgres message and line number. The editor holds the COMPLETE Postgres DDL script for the diagram, and it is always run against an empty database: an ALTER only works if the CREATE it modifies is in the same script. Extensions available: pg_trgm, btree_gin, btree_gist, vector. COMMENT ON statements appear in the diagram.
View tool JSON
{
"name": "validate_sql",
"kind": "act",
"impl": "imperative",
"description": "Runs the DDL against a scratch Postgres (nothing is kept) and reports whether it is valid. On failure it throws with the Postgres message and line number. The editor holds the COMPLETE Postgres DDL script for the diagram, and it is always run against an empty database: an ALTER only works if the CREATE it modifies is in the same script. Extensions available: pg_trgm, btree_gin, btree_gist, vector. COMMENT ON statements appear in the diagram.",
"inputSchema": {
"type": "object",
"properties": {
"sql": {
"type": "string",
"description": "The complete DDL script."
}
},
"required": [
"sql"
],
"additionalProperties": false
},
"page": "/webmcp-pglite-erd-diagram/"
}write_sqlAction
REPLACES the editor content with the given DDL after validating and formatting it; the diagram updates. If formatting or validation fails it throws and changes nothing. The editor holds the COMPLETE Postgres DDL script for the diagram, and it is always run against an empty database: an ALTER only works if the CREATE it modifies is in the same script. Extensions available: pg_trgm, btree_gin, btree_gist, vector. COMMENT ON statements appear in the diagram.
View tool JSON
{
"name": "write_sql",
"kind": "act",
"impl": "imperative",
"description": "REPLACES the editor content with the given DDL after validating and formatting it; the diagram updates. If formatting or validation fails it throws and changes nothing. The editor holds the COMPLETE Postgres DDL script for the diagram, and it is always run against an empty database: an ALTER only works if the CREATE it modifies is in the same script. Extensions available: pg_trgm, btree_gin, btree_gist, vector. COMMENT ON statements appear in the diagram.",
"inputSchema": {
"type": "object",
"properties": {
"sql": {
"type": "string",
"description": "The complete DDL script."
}
},
"required": [
"sql"
],
"additionalProperties": false
},
"page": "/webmcp-pglite-erd-diagram/"
}read_schemaAnswer
Returns the schema the current editor DDL produces: tables, views, materialized views (kind field), partitioned tables with their nested partitions and bounds, columns (type, nullability, default, comment), indexes (kind, columns), foreign keys, comments and view dependencies. Throws if the current DDL is invalid.
View tool JSON
{
"name": "read_schema",
"kind": "answer",
"impl": "imperative",
"description": "Returns the schema the current editor DDL produces: tables, views, materialized views (kind field), partitioned tables with their nested partitions and bounds, columns (type, nullability, default, comment), indexes (kind, columns), foreign keys, comments and view dependencies. Throws if the current DDL is invalid.",
"page": "/webmcp-pglite-erd-diagram/"
}