Sezzlee SQL Server
v0.2.1Explore and query Microsoft SQL Server read-only: catalogue search, schema and bounded queries.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
describe_connection
Report which database this server is connected to, what the connection may do, and the limits every other tool is bound by. Takes no arguments and never returns credentials.
search_catalog
Find the tables and views this connection can read by concept rather than by exact name: the query is matched against schema, object and column names and against whatever descriptions the catalogue carries, and each result says which of them matched. Leave query empty to page through the catalogue instead. Start here — the names it returns are the ones describe_table and run_query accept.
| Parameter | Type | Description |
|---|---|---|
cursor | string | nextCursor from a previous search with the same query, schema, namePattern and includeViews, to continue its results. |
includeViews | boolean | Include views as well as tables, default true. |
maxResults | integer | Maximum objects returned, default 50. |
namePattern | string | Keep only objects whose name matches this LIKE pattern: % stands for any run of characters and _ for one. Case- and accent-insensitive. |
query | string | Words describing what you are looking for, such as customer orders. Matched against names and descriptions, ignoring case and accents. Omit to list every object. |
refresh | boolean | Read the catalogue again instead of using the cached copy, default false. Use it after a schema change; it invalidates earlier cursors. |
schema | string | Keep only objects in this schema. Case-insensitive. |
describe_table
Report one table's columns with their types and nullability, plus its primary, unique and foreign keys. Read this before writing a query against the table.
| Parameter | Type | Description |
|---|---|---|
schema * | string | Schema of the table, as search_catalog returned it. |
table * | string | Name of the table or view, as search_catalog returned it. |
run_query
Run one read-only SQL statement and return its rows. Writes are refused. The response is capped and there is no cursor, so walk a large result by adding your own ordering and paging clause; a truncated response says which clause this engine uses.
| Parameter | Type | Description |
|---|---|---|
sql * | string | One read-only statement in this engine's SQL dialect. A statement that writes, or more than one statement, is refused. |
maxRows | integer | Maximum rows returned. Defaults to defaultRows from describe_connection. A longer result is cut and says so. |
timeoutMs | integer | Deadline for the statement in milliseconds; the server cancels it when the deadline passes. Defaults to queryTimeoutMs from describe_connection. |