Skip to content

Tools

All tools return JSON as a text content block. Failures come back with isError: true and the error message as text.

Lists tables and views in every user schema (skips pg_catalog, information_schema, and excluded tables).

Arguments: none

Returns: [{ table_schema, table_name, table_type }]

Shows the columns of one table.

Argument Type Default Notes
table string required Exact name, case-sensitive (Device, not device)
schema string public

Returns: [{ column_name, data_type, is_nullable, column_default }]. An empty array means the table wasn’t found.

Runs one read-only SQL statement. See Query rules for what’s allowed.

Argument Type Notes
sql string One statement. A trailing ; is fine.

Returns:

{ "rowCount": 2000, "rows": [ ... up to 500 ... ], "truncated": true }

rowCount is the total the database returned; rows is capped at 500.