Run a read-only SQL query
queryRun read-only SQL SELECT statements to read SynapCores data, including vector similarity searches, with automatic row limits and paging; return results as JSON, Markdown, or CSV.
Instructions
Run a read-only SQL SELECT (or WITH ... SELECT) on a SynapCores database and return the rows. Use it to read data, including vector search over table columns with EMBED() and COSINE_SIMILARITY(); use execute for writes and schema changes (any other statement is rejected here), graph_query for Cypher, and semantic_search for vector collections. When the SQL has no LIMIT, LIMIT limit (default 1000, max 10000) and OFFSET offset are appended. Returns column names and types plus rows as JSON, or a Markdown table or CSV per format.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sql": "<sql>"
},
"name": "query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | A SELECT or WITH statement. Look up syntax and AI functions with `sql_manual`. | |
| limit | No | Row cap appended as LIMIT when the SQL has none (default 1000, max 10000). | |
| format | No | rows = JSON with columns and rows (default); markdown = a table; csv = comma-separated text. | rows |
| offset | No | Rows to skip, appended as OFFSET (default 0); combine with `limit` to page through results. | |
| database | No | Database name; omit to use the default database. |