db-mcp 1.1.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitleaks.toml +9 -0
- package/.trivyignore +8 -0
- package/README.md +193 -120
- package/dist/{chunk-TVIZ3XJH.js → chunk-5Y42NPBP.js} +4168 -2411
- package/dist/{chunk-AOUL5SHS.js → chunk-645ZEFLA.js} +70 -20
- package/dist/chunk-OKOVZ5QE.js +28 -0
- package/dist/chunk-SFJQCNG7.js +131 -0
- package/dist/{chunk-FW7UCRLN.js → chunk-VIDSICEL.js} +3 -0
- package/dist/chunk-WBER5YY4.js +2053 -0
- package/dist/{chunk-4IA3DB5C.js → chunk-X3MUUOWM.js} +19 -2
- package/dist/{chunk-Z2GFQU3G.js → chunk-Z7C2TM4L.js} +114 -21
- package/dist/cli.js +79 -5
- package/dist/{http-VSB7DBJR.js → http-6KF4ULDI.js} +199 -77
- package/dist/index.d.ts +231 -8
- package/dist/index.js +6 -5
- package/dist/{sqlite-26V3Y4MK.js → sqlite-U5KSYQXK.js} +62 -138
- package/dist/{sqlite-native-5O7FZJGB.js → sqlite-native-JXMCFQBA.js} +575 -113
- package/dist/worker-script.js +34 -10
- package/logs/.gitkeep +1 -0
- package/mcp-config-example.json +83 -0
- package/package.json +9 -8
- package/playwright.config.ts +1 -1
- package/scripts/update-badges.ts +99 -0
- package/server.json +7 -5
- package/test-server/README.md +20 -23
- package/test-server/code-map.md +45 -33
- package/test-server/reset-database.ps1 +59 -17
- package/test-server/scripts/README.md +27 -0
- package/test-server/{test-help-resources.mjs → scripts/test-help-resources.mjs} +12 -5
- package/test-server/scripts/test-prompts.mjs +251 -0
- package/test-server/{test-tool-annotations.mjs → scripts/test-tool-annotations.mjs} +9 -4
- package/test-server/test-advanced/README.md +70 -0
- package/test-server/test-advanced/test-codemode-advanced-admin.md +174 -0
- package/test-server/test-advanced/test-codemode-advanced-core.md +193 -0
- package/test-server/test-advanced/test-codemode-advanced-geo.md +157 -0
- package/test-server/test-advanced/test-codemode-advanced-introspection.md +171 -0
- package/test-server/test-advanced/test-codemode-advanced-json.md +169 -0
- package/test-server/test-advanced/test-codemode-advanced-migration.md +160 -0
- package/test-server/test-advanced/test-codemode-advanced-stats.md +185 -0
- package/test-server/test-advanced/test-codemode-advanced-text.md +183 -0
- package/test-server/test-advanced/test-codemode-advanced-transactions.md +136 -0
- package/test-server/test-advanced/test-codemode-advanced-vector.md +141 -0
- package/test-server/test-codemode/README.md +121 -0
- package/test-server/test-codemode/test-codemode-admin.md +223 -0
- package/test-server/test-codemode/test-codemode-core.md +286 -0
- package/test-server/test-codemode/test-codemode-geo.md +177 -0
- package/test-server/test-codemode/test-codemode-introspection.md +190 -0
- package/test-server/test-codemode/test-codemode-json.md +237 -0
- package/test-server/test-codemode/test-codemode-migration.md +278 -0
- package/test-server/test-codemode/test-codemode-sandbox.md +413 -0
- package/test-server/test-codemode/test-codemode-stats.md +232 -0
- package/test-server/test-codemode/test-codemode-text.md +237 -0
- package/test-server/test-codemode/test-codemode-transactions.md +236 -0
- package/test-server/test-codemode/test-codemode-vector.md +244 -0
- package/test-server/test-codemode/test-codemode-wasm-degradation.md +394 -0
- package/test-server/test-database.sql +37 -1
- package/test-server/test-resources.md +43 -16
- package/test-server/test-tool-groups/README.md +100 -0
- package/test-server/test-tool-groups/test-admin-core.md +165 -0
- package/test-server/test-tool-groups/test-admin-extensions.md +133 -0
- package/test-server/{test-tools.md → test-tool-groups/test-core-data.md} +103 -17
- package/test-server/test-tool-groups/test-core-schema.md +240 -0
- package/test-server/test-tool-groups/test-geo-haversine.md +130 -0
- package/test-server/test-tool-groups/test-geo-spatialite.md +110 -0
- package/test-server/test-tool-groups/test-introspection-diagnostics.md +123 -0
- package/test-server/test-tool-groups/test-introspection-schema.md +133 -0
- package/test-server/test-tool-groups/test-json-read.md +219 -0
- package/test-server/test-tool-groups/test-json-write.md +157 -0
- package/test-server/test-tool-groups/test-migration.md +193 -0
- package/test-server/test-tool-groups/test-stats-advanced.md +118 -0
- package/test-server/test-tool-groups/test-stats-basic.md +156 -0
- package/test-server/test-tool-groups/test-text-advanced.md +169 -0
- package/test-server/test-tool-groups/test-text-basic.md +177 -0
- package/test-server/test-tool-groups/test-transactions.md +179 -0
- package/test-server/test-tool-groups/test-vector-read.md +130 -0
- package/test-server/test-tool-groups/test-vector-write.md +115 -0
- package/test-server/tool-reference.md +79 -58
- package/tsconfig.build.json +6 -0
- package/dist/chunk-RHVEZ42P.js +0 -873
- package/test-server/test-agent-experience.md +0 -243
- package/test-server/test-group-tools.md +0 -861
- package/test-server/test-tools-advanced-1.md +0 -517
- package/test-server/test-tools-advanced-2.md +0 -487
- package/test-server/test-tools-codemode.md +0 -629
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
# Agent Experience Test — db-mcp (SQLite)
|
|
2
|
-
|
|
3
|
-
> **Purpose:** Validate that the slim `instructions` field + `sqlite://help` resources are sufficient for an agent to operate the server cold — with **zero** schema info, tool hints, or checklists in the prompt.
|
|
4
|
-
|
|
5
|
-
## How to Run
|
|
6
|
-
|
|
7
|
-
Run **each pass** as a separate conversation with the corresponding `--tool-filter`. Each pass tests whether the agent can complete realistic tasks using only the tools + help resources available under that filter.
|
|
8
|
-
|
|
9
|
-
| Pass | `--tool-filter` | Tools | Scenarios |
|
|
10
|
-
| ------ | ------------------------------ | ------------------------------------ | --------- |
|
|
11
|
-
| Pass 1 | `starter` | Core, JSON, Text (~50) | 1–12 |
|
|
12
|
-
| Pass 2 | `analytics` | Core, JSON, Stats (~52) | 13–16 |
|
|
13
|
-
| Pass 3 | `search` | Core, Text, Vector (~38) | 17–18 |
|
|
14
|
-
| Pass 4 | `codemode` | Code Mode only (1+3) | 19–20 |
|
|
15
|
-
| Pass 5 | `core,geo` | Core, Geo (~22) | 21–23 |
|
|
16
|
-
| Pass 6 | `core,admin` | Core, Admin (~44) | 24–26 |
|
|
17
|
-
| Pass 7 | `core,introspection,migration` | Core, Introspection, Migration (~27) | 27–29 |
|
|
18
|
-
|
|
19
|
-
> **Important:** Do NOT combine passes. Each pass is a fresh conversation with a clean context. The agent has never seen this database before.
|
|
20
|
-
|
|
21
|
-
## Rules
|
|
22
|
-
|
|
23
|
-
1. **Do NOT read** `test-tools.md`, `test-group-tools.md`, or any other test documentation before running these scenarios
|
|
24
|
-
2. **Do NOT read** source code files (`src/`) — you are a user, not a developer
|
|
25
|
-
3. **DO** use the MCP instructions you received during initialization + `sqlite://help` resources
|
|
26
|
-
4. **DO** discover the database schema via `sqlite://schema` or `sqlite://tables` resources
|
|
27
|
-
5. **DO** read group-specific help (`sqlite://help/{group}`) when you need reference for unfamiliar tools
|
|
28
|
-
6. Use the test database (`test-server/test.db`) which is already connected
|
|
29
|
-
|
|
30
|
-
## Success Criteria
|
|
31
|
-
|
|
32
|
-
| Symbol | Meaning |
|
|
33
|
-
| ------ | --------------------------------------------------------------------- |
|
|
34
|
-
| ✅ | Agent completed the task correctly without external help |
|
|
35
|
-
| ⚠️ | Agent completed but needed multiple retries or used wrong tools first |
|
|
36
|
-
| ❌ | Agent failed or produced incorrect results |
|
|
37
|
-
| 📖 | Agent had to read help resources — note which ones |
|
|
38
|
-
|
|
39
|
-
Track **every** help resource read and whether it provided what was needed. Gaps are the actionable finding.
|
|
40
|
-
|
|
41
|
-
## Reporting Format
|
|
42
|
-
|
|
43
|
-
For each scenario, report:
|
|
44
|
-
|
|
45
|
-
```
|
|
46
|
-
### Scenario N: [title]
|
|
47
|
-
**Result:** ✅/⚠️/❌
|
|
48
|
-
**Resources read:** sqlite://help, sqlite://help/json (or "none beyond instructions")
|
|
49
|
-
**Tools used:** sqlite_read_query, sqlite_json_query, ...
|
|
50
|
-
**Issues:** (any gaps in help content, confusing tool names, missing examples)
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
## Pass 1: `starter`
|
|
56
|
-
|
|
57
|
-
**Tool groups under test:** `core` (10), `json` (24), `text` (14), `codemode` (1)
|
|
58
|
-
|
|
59
|
-
### Phase 1 — Discovery
|
|
60
|
-
|
|
61
|
-
#### Scenario 1 — What's in this database?
|
|
62
|
-
|
|
63
|
-
List all tables and briefly describe what each one contains.
|
|
64
|
-
|
|
65
|
-
#### Scenario 2 — Table deep dive
|
|
66
|
-
|
|
67
|
-
Pick the most interesting table and fully characterize it: row count, column types, sample data, indexes, and any foreign key relationships.
|
|
68
|
-
|
|
69
|
-
#### Scenario 3 — Health check
|
|
70
|
-
|
|
71
|
-
Is the database healthy? What backend and mode is it running in? What are the key PRAGMA settings?
|
|
72
|
-
|
|
73
|
-
### Phase 2 — Core Operations
|
|
74
|
-
|
|
75
|
-
#### Scenario 4 — Filtered read
|
|
76
|
-
|
|
77
|
-
Find all products in the "electronics" category priced above $50, sorted by price descending.
|
|
78
|
-
|
|
79
|
-
#### Scenario 5 — Aggregation
|
|
80
|
-
|
|
81
|
-
What is the total revenue (sum of total_price) per order status? Which status has the highest revenue?
|
|
82
|
-
|
|
83
|
-
#### Scenario 6 — Write and verify
|
|
84
|
-
|
|
85
|
-
Create a new product called "Test Widget" in the "gadgets" category priced at $29.99, then verify it was inserted. Clean up after.
|
|
86
|
-
|
|
87
|
-
### Phase 3 — JSON Operations
|
|
88
|
-
|
|
89
|
-
#### Scenario 7 — JSON extraction
|
|
90
|
-
|
|
91
|
-
Extract the `name` and `version` fields from the JSON documents in `test_jsonb_docs`. Which documents have a version above 2?
|
|
92
|
-
|
|
93
|
-
#### Scenario 8 — Nested JSON
|
|
94
|
-
|
|
95
|
-
Find the deeply nested value at `$.nested.level1.level2` in `test_jsonb_docs`. Which row has it?
|
|
96
|
-
|
|
97
|
-
#### Scenario 9 — JSON analysis
|
|
98
|
-
|
|
99
|
-
Analyze the JSON schema of the `doc` column in `test_jsonb_docs`. What field types and nesting patterns exist?
|
|
100
|
-
|
|
101
|
-
### Phase 4 — Text & Search
|
|
102
|
-
|
|
103
|
-
#### Scenario 10 — Full-text search
|
|
104
|
-
|
|
105
|
-
Search the articles for content about "database" and "search". Rank results by relevance.
|
|
106
|
-
|
|
107
|
-
> **Note:** FTS5 tables may need to be created/rebuilt before searching. The agent should figure this out from help resources.
|
|
108
|
-
|
|
109
|
-
#### Scenario 11 — Fuzzy matching
|
|
110
|
-
|
|
111
|
-
Find users whose names are similar to "Jon" (fuzzy match). What did you find?
|
|
112
|
-
|
|
113
|
-
#### Scenario 12 — Text processing
|
|
114
|
-
|
|
115
|
-
Normalize and validate the email addresses in `test_users`. Are any malformed?
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## Pass 2: `analytics`
|
|
120
|
-
|
|
121
|
-
**Tool groups under test:** `core` (10), `json` (24), `stats` (14), `codemode` (1)
|
|
122
|
-
|
|
123
|
-
### Phase 5 — Statistics
|
|
124
|
-
|
|
125
|
-
#### Scenario 13 — Descriptive stats
|
|
126
|
-
|
|
127
|
-
Compute descriptive statistics (mean, median, std dev, min, max) for the `temperature` column in `test_measurements`. Break it down by `sensor_id`.
|
|
128
|
-
|
|
129
|
-
#### Scenario 14 — Outlier detection
|
|
130
|
-
|
|
131
|
-
Are there any outlier temperature readings in `test_measurements`? What method did you use?
|
|
132
|
-
|
|
133
|
-
#### Scenario 15 — Correlation
|
|
134
|
-
|
|
135
|
-
Is there a correlation between temperature and humidity in `test_measurements`? How strong?
|
|
136
|
-
|
|
137
|
-
#### Scenario 16 — Cross-table analysis
|
|
138
|
-
|
|
139
|
-
Which products have the most orders? Join the data and present a ranked summary with product name, order count, and total revenue.
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
## Pass 3: `search`
|
|
144
|
-
|
|
145
|
-
**Tool groups under test:** `core` (10), `text` (14), `vector` (12), `codemode` (1)
|
|
146
|
-
|
|
147
|
-
### Phase 6 — Vector & Semantic Search
|
|
148
|
-
|
|
149
|
-
#### Scenario 17 — Similarity search
|
|
150
|
-
|
|
151
|
-
Find the 3 embeddings most similar to the first embedding in `test_embeddings`. What categories are they?
|
|
152
|
-
|
|
153
|
-
#### Scenario 18 — Hybrid search
|
|
154
|
-
|
|
155
|
-
Search articles for "database" using full-text search, then find semantically similar embeddings. Can the agent combine both approaches?
|
|
156
|
-
|
|
157
|
-
---
|
|
158
|
-
|
|
159
|
-
## Pass 4: `codemode`
|
|
160
|
-
|
|
161
|
-
**Tool groups under test:** `codemode` (1) + built-in resources (3)
|
|
162
|
-
|
|
163
|
-
### Phase 7 — Code Mode Discovery & Efficiency
|
|
164
|
-
|
|
165
|
-
#### Scenario 19 — Cold-start Code Mode
|
|
166
|
-
|
|
167
|
-
Using only `sqlite_execute_code`, list all tables, pick one, and run a query against it. Can the agent discover the `sqlite.*` API without external help?
|
|
168
|
-
|
|
169
|
-
#### Scenario 20 — Multi-step workflow
|
|
170
|
-
|
|
171
|
-
Using only `sqlite_execute_code`, find the top 5 products by order count with total revenue — in a single code execution. Compare the token efficiency vs what Pass 1/2 would require.
|
|
172
|
-
|
|
173
|
-
---
|
|
174
|
-
|
|
175
|
-
## Pass 5: `core,geo`
|
|
176
|
-
|
|
177
|
-
**Tool groups under test:** `core` (10), `geo` (5), `codemode` (1)
|
|
178
|
-
|
|
179
|
-
### Phase 8 — Geospatial
|
|
180
|
-
|
|
181
|
-
#### Scenario 21 — Distance between cities
|
|
182
|
-
|
|
183
|
-
What is the distance between New York and Paris based on the coordinates in `test_locations`?
|
|
184
|
-
|
|
185
|
-
#### Scenario 22 — Nearby locations
|
|
186
|
-
|
|
187
|
-
Find all locations within 100km of London. How many are there?
|
|
188
|
-
|
|
189
|
-
#### Scenario 23 — Bounding box
|
|
190
|
-
|
|
191
|
-
Find all locations within the bounding box covering Western Europe (lat 40–55, lon -5 to 15).
|
|
192
|
-
|
|
193
|
-
---
|
|
194
|
-
|
|
195
|
-
## Pass 6: `core,admin`
|
|
196
|
-
|
|
197
|
-
**Tool groups under test:** `core` (10), `admin` (27), `codemode` (1)
|
|
198
|
-
|
|
199
|
-
### Phase 9 — Admin & Data Quality
|
|
200
|
-
|
|
201
|
-
#### Scenario 24 — Data quality audit
|
|
202
|
-
|
|
203
|
-
Audit the database for data quality issues: NULL values, duplicate entries, orphaned foreign keys, unused indexes. Summarize findings.
|
|
204
|
-
|
|
205
|
-
#### Scenario 25 — Database health & optimization
|
|
206
|
-
|
|
207
|
-
Run an integrity check, analyze the database, then suggest and apply optimizations.
|
|
208
|
-
|
|
209
|
-
#### Scenario 26 — Backup and restore
|
|
210
|
-
|
|
211
|
-
Create a backup of the database. Verify the backup exists and is valid.
|
|
212
|
-
|
|
213
|
-
---
|
|
214
|
-
|
|
215
|
-
## Pass 7: `core,introspection,migration`
|
|
216
|
-
|
|
217
|
-
**Tool groups under test:** `core` (10), `introspection` (10), `migration` (7), `codemode` (1)
|
|
218
|
-
|
|
219
|
-
### Phase 10 — Schema Analysis & Migration
|
|
220
|
-
|
|
221
|
-
#### Scenario 27 — Dependency graph
|
|
222
|
-
|
|
223
|
-
Map out the foreign key dependency graph. Which tables have the most dependencies? What's the topological sort order?
|
|
224
|
-
|
|
225
|
-
#### Scenario 28 — Cascade simulation
|
|
226
|
-
|
|
227
|
-
What would happen if `test_products` row 1 were deleted? Simulate the cascade impact on related tables.
|
|
228
|
-
|
|
229
|
-
#### Scenario 29 — Migration workflow
|
|
230
|
-
|
|
231
|
-
Initialize migration tracking, then create and apply a migration that adds a `description` column to `test_products`. Roll it back after verifying.
|
|
232
|
-
|
|
233
|
-
---
|
|
234
|
-
|
|
235
|
-
## Post-Test Summary
|
|
236
|
-
|
|
237
|
-
Compile findings across all passes into:
|
|
238
|
-
|
|
239
|
-
1. **Help resource gaps** — scenarios where help content was missing, incomplete, or misleading
|
|
240
|
-
2. **Discovery friction** — cases where the agent struggled to find the right tool or resource
|
|
241
|
-
3. **Suggested improvements** — specific additions to `src/constants/server-instructions/*.md`
|
|
242
|
-
|
|
243
|
-
> **Key metric:** How many of the 29 scenarios did the agent complete on the first try with ≤1 help resource read? This measures whether the instructions + tool descriptions are self-sufficient.
|