You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add stoolap://sql-reference resource for discoverability
The sql-assistant prompt content was not discoverable as a resource.
Add stoolap://sql-reference resource exposing the live schema and full
SQL reference. Extract shared buildSchemaText() and sqlReference constant
to avoid duplication between the resource and prompt.
Copy file name to clipboardExpand all lines: README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,12 +121,13 @@ For deeper reference (live schema + full function signatures), attach the `sql-a
121
121
| URI | Description |
122
122
|-----|-------------|
123
123
|`stoolap://schema`| Full database schema with all tables, views, columns, indexes, and DDL statements |
124
+
|`stoolap://sql-reference`| Live database schema plus complete Stoolap SQL reference: data types, 130+ functions with signatures, operators, joins, indexes, window functions, CTEs, transactions, temporal queries, vector search, and known limitations |
124
125
125
126
## Prompts
126
127
127
128
| Prompt | Description |
128
129
|--------|-------------|
129
-
|`sql-assistant`|Injects the live database schema and a complete Stoolap SQL reference (data types, all 130+ functions with signatures, operators, index types, join types, window functions, CTEs, transactions, EXPLAIN, PRAGMA, and known limitations). Provides deeper detail than the auto-injected instructions. |
130
+
|`sql-assistant`|Same content as `stoolap://sql-reference` delivered as an MCP prompt. Use whichever your client supports. |
"Injects live database schema and complete Stoolap SQL reference (all data types, 130+ functions with signatures, all operators, join types, index types, window functions, CTEs, transactions, temporal queries, vector search, and known limitations). Attach to give the model full context.",
text: `You are a SQL expert for a Stoolap database. Below is the live schema followed by the complete SQL reference. Write accurate, optimized queries using only supported features.
"Injects live database schema and complete Stoolap SQL reference (all data types, 130+ functions with signatures, all operators, join types, index types, window functions, CTEs, transactions, temporal queries, vector search, and known limitations). Attach to give the model full context.",
1404
+
{},
1405
+
async()=>{
1406
+
constschemaText=awaitbuildSchemaText();
1407
+
return{
1408
+
messages: [
1409
+
{
1410
+
role: "user"asconst,
1411
+
content: {
1412
+
type: "text"asconst,
1413
+
text: `You are a SQL expert for a Stoolap database. Below is the live schema followed by the complete SQL reference. Write accurate, optimized queries using only supported features.\n\n## Current Database Schema\n\n\`\`\`sql\n${schemaText}\`\`\`\n\n${sqlReference}`,
0 commit comments