SQL

v0.1.0
io.github.Abhishekkumar2021/sql Checked 12 hours ago Published 5 months ago

Read-only SQL querying + schema introspection over Postgres & SQLite, with a gated write mode.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_connections List connections

Configured database connections (name + type). No credentials are returned.

list_schemas List schemas

Schemas available in a connection (SQLite returns 'main').

ParameterTypeDescription
connection *stringConfigured connection name (see list_connections)

list_tables List tables

Tables and views in a schema.

ParameterTypeDescription
connection *stringConfigured connection name (see list_connections)
schemastring

describe_table Describe table

Columns (type/nullable/default), primary key, foreign keys, and indexes for a table.

ParameterTypeDescription
connection *stringConfigured connection name (see list_connections)
table *string
schemastring

list_indexes List indexes

Indexes on a table (name, columns, uniqueness).

ParameterTypeDescription
connection *stringConfigured connection name (see list_connections)
table *string
schemastring

relationships Relationships

Foreign-key relationships in a schema (from table.column → to table.column).

ParameterTypeDescription
connection *stringConfigured connection name (see list_connections)
schemastring

query Run query

Run a read-only SELECT (only SELECT/WITH/VALUES). Use positional params. Results are row/cell-capped.

ParameterTypeDescription
connection *stringConfigured connection name (see list_connections)
sql *string
paramsarrayPositional bind parameters

explain Explain query

Query plan for a SELECT (the server prepends EXPLAIN; no query is executed).

ParameterTypeDescription
connection *stringConfigured connection name (see list_connections)
sql *string
paramsarrayPositional bind parameters

sample_table Sample table

Return up to `limit` rows from a table (SELECT * … LIMIT).

ParameterTypeDescription
connection *stringConfigured connection name (see list_connections)
table *string
limitinteger
schemastring