{"ok":true,"site":{"host":"nickdeis.github.io","url":"https://nickdeis.github.io/webmcp-pglite-erd-diagram/","type":"live","desc":"pglite-diagram","tools":[{"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.","annotations":{"readOnlyHint":true},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/webmcp-pglite-erd-diagram/"},{"name":"format_sql","kind":"act","impl":"imperative","description":"Formats Postgres SQL (lower-case keywords) and returns it. Does not change the editor.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"sql":{"type":"string","description":"The complete DDL script."}},"required":["sql"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/webmcp-pglite-erd-diagram/"},{"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.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"sql":{"type":"string","description":"The complete DDL script."}},"required":["sql"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/webmcp-pglite-erd-diagram/"},{"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},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/webmcp-pglite-erd-diagram/"},{"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.","annotations":{"readOnlyHint":true},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/webmcp-pglite-erd-diagram/"}],"category":"Developer Tools","apiSurface":"spec","toolCount":5}}