@functional-systems/lambdadb-mcp 0.1.0 → 0.1.1-dev.7
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/CHANGELOG.md +13 -0
- package/README.md +89 -14
- package/RELEASING.md +7 -7
- package/dist/tools/read.js +24 -4
- package/dist/tools/write.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
- Pin the LambdaDB TypeScript SDK to 0.6.0, including all 16 text analyzers.
|
|
6
|
+
- Add keyword facets, query omission for match-all, and facet-only `size: 0` to
|
|
7
|
+
`lambdadb_query_collection`. Preserve omitted/null bucket sizes and facet results,
|
|
8
|
+
including automatic document downloads; retain existing search options and refs.
|
|
9
|
+
- Expose facet limits and the `size: 0` condition in MCP JSON Schema and validate
|
|
10
|
+
them through tool calls, SDK HTTP contracts, installed-package tests, and the
|
|
11
|
+
opt-in live suite. Read-only defaults and explicit write opt-in are unchanged.
|
|
12
|
+
- Facets require a supporting server and newly built keyword indexes. Existing
|
|
13
|
+
Collections are not migrated, and existing MCP installations require an update
|
|
14
|
+
to a separately published MCP version containing this change.
|
|
15
|
+
|
|
3
16
|
## [0.1.0] - 2026-09-20
|
|
4
17
|
|
|
5
18
|
- Package `@functional-systems/lambdadb-mcp` and the `lambdadb-mcp` executable for npm/npx distribution under Apache-2.0.
|
package/README.md
CHANGED
|
@@ -14,19 +14,20 @@ MCP server for LambdaDB using the official TypeScript MCP SDK and the official L
|
|
|
14
14
|
Package: `@functional-systems/lambdadb-mcp`. Executable: `lambdadb-mcp`.
|
|
15
15
|
Requires Node.js >=22.14.0; CI tests the minimum and current Node 22/24 LTS.
|
|
16
16
|
|
|
17
|
-
The package is
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
`0.1.0-dev.1` and does not indicate a stable release. See
|
|
17
|
+
The stable package is available on npm. As verified on 2026-09-20 (KST),
|
|
18
|
+
`latest` resolves to `0.1.0` and `dev` to `0.1.0-dev.5`. Use an exact version for
|
|
19
|
+
reproducibility or the default stable channel for initial setup. See
|
|
21
20
|
[release status and policy](RELEASING.md).
|
|
22
21
|
|
|
23
22
|
```sh
|
|
24
|
-
npx --yes @functional-systems/lambdadb-mcp
|
|
25
|
-
#
|
|
23
|
+
npx --yes @functional-systems/lambdadb-mcp
|
|
24
|
+
# Pin the first stable release:
|
|
25
|
+
npx --yes @functional-systems/lambdadb-mcp@0.1.0
|
|
26
|
+
# Or install globally:
|
|
26
27
|
npm install -g @functional-systems/lambdadb-mcp
|
|
27
28
|
lambdadb-mcp
|
|
28
|
-
#
|
|
29
|
-
npx --yes @functional-systems/lambdadb-mcp
|
|
29
|
+
# Opt into development builds explicitly:
|
|
30
|
+
npx --yes @functional-systems/lambdadb-mcp@dev
|
|
30
31
|
```
|
|
31
32
|
|
|
32
33
|
Set the environment variables below in your MCP client or securely in the parent
|
|
@@ -94,10 +95,11 @@ Optional write tools:
|
|
|
94
95
|
|
|
95
96
|
## API contract and tool inputs
|
|
96
97
|
|
|
97
|
-
The LambdaDB SDK is pinned to `@functional-systems/lambdadb@0.
|
|
98
|
-
|
|
99
|
-
[`
|
|
100
|
-
This
|
|
98
|
+
The LambdaDB SDK is pinned to `@functional-systems/lambdadb@0.6.0`, checked against
|
|
99
|
+
the published package and [v0.6.0 release](https://github.com/lambdadb/lambdadb-typescript-client/releases/tag/v0.6.0)
|
|
100
|
+
at [`491d01e`](https://github.com/lambdadb/lambdadb-typescript-client/commit/491d01e0eb54bd135823fab79cbe32396ec03691).
|
|
101
|
+
This dependency update applies to builds containing this change. Publishing the SDK
|
|
102
|
+
alone does not update previously published or installed MCP packages.
|
|
101
103
|
|
|
102
104
|
- Collection creation requires a nonempty `indexConfigs` and accepts `description`,
|
|
103
105
|
metadata `tags`, `partitionConfig`, and `snapshotRetentionInDays` (1–31).
|
|
@@ -105,6 +107,12 @@ This source revision does not establish which API revision is deployed.
|
|
|
105
107
|
- Query, Fetch, and List accept `ref: { kind: "branch" | "tag" | "alias", name: "..." }`.
|
|
106
108
|
Omitting `ref` reads from `main`. `consistentRead: true` is supported only by
|
|
107
109
|
Query/Fetch with an omitted ref or a direct Branch ref. List has no `consistentRead`.
|
|
110
|
+
- Query may omit `query` for match-all and accepts `facets` for keyword bucket counts
|
|
111
|
+
across all matches. Document `size` is 1–100, or 0 when at least one facet is supplied.
|
|
112
|
+
Up to five facet fields (including dotted paths) are allowed. Each field's options
|
|
113
|
+
accept only `size`: an integer from 1–100, omitted, or `null`. Omitted/null bucket
|
|
114
|
+
size uses the server default of 10; MCP forwards it unchanged. Empty `facets: {}`
|
|
115
|
+
is accepted except with `size: 0`. Facet results survive inline and `docsUrl` responses.
|
|
108
116
|
- List also accepts `filter`, `fields`, `includeVectors`, and `partitionFilter`.
|
|
109
117
|
The SDK selects the extended POST endpoint when needed and preserves pagination tokens.
|
|
110
118
|
- Upsert/Delete accept an optional `branch`; omitting it writes to `main`.
|
|
@@ -121,6 +129,67 @@ Query/Fetch/List download top-level document arrays and retain legacy `{ "docs":
|
|
|
121
129
|
support without sending the project API key to the download URL. No additional SDK
|
|
122
130
|
patch is needed for this issue.
|
|
123
131
|
|
|
132
|
+
### Query examples
|
|
133
|
+
|
|
134
|
+
Arguments for `lambdadb_query_collection`, returning only facets across all documents:
|
|
135
|
+
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"collectionName": "products",
|
|
139
|
+
"size": 0,
|
|
140
|
+
"facets": { "category": {}, "metadata.brand": { "size": null } }
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Return matching documents and facets together:
|
|
145
|
+
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"collectionName": "products",
|
|
149
|
+
"query": { "queryString": { "query": "title:coffee" } },
|
|
150
|
+
"size": 10,
|
|
151
|
+
"facets": { "category": { "size": 5 } },
|
|
152
|
+
"fields": { "include": ["id", "title", "category"] }
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
For match-all documents without facets, use `{ "collectionName": "products", "size": 10 }`.
|
|
157
|
+
MCP returns JSON in its text content, with `docs`, `total`, `took`, and (when returned
|
|
158
|
+
by the service) `facets`, for example `"facets": { "category": { "buckets": [
|
|
159
|
+
{ "value": "drinks", "count": 42 } ] } }`. Bucket counts cover all matching
|
|
160
|
+
documents, independently of document `size`; duplicate keyword array values count
|
|
161
|
+
once per document. `total` counts returned documents (0 for facet-only requests),
|
|
162
|
+
not all matching documents. Counts use JavaScript Number and may lose integer precision
|
|
163
|
+
above `Number.MAX_SAFE_INTEGER`.
|
|
164
|
+
|
|
165
|
+
Facets require a supporting server deployment and newly built keyword indexes.
|
|
166
|
+
This MCP update does not migrate existing Collections or indexes. Partial updates,
|
|
167
|
+
segment merging, and old Tags do not upgrade old indexes. If migration is needed,
|
|
168
|
+
plan and authorize reinsertion into a new Collection separately.
|
|
169
|
+
|
|
170
|
+
### Text analyzers in collection creation
|
|
171
|
+
|
|
172
|
+
With write tools explicitly enabled, `lambdadb_create_collection` accepts:
|
|
173
|
+
|
|
174
|
+
```json
|
|
175
|
+
{
|
|
176
|
+
"collectionName": "products",
|
|
177
|
+
"indexConfigs": {
|
|
178
|
+
"title": { "type": "text", "analyzers": ["english", "chinese", "french"] },
|
|
179
|
+
"category": { "type": "keyword" },
|
|
180
|
+
"metadata": { "type": "object", "objectIndexConfigs": { "brand": { "type": "keyword" } } }
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Supported lowercase names: `standard`, `english`, `korean`, `japanese`, `chinese`,
|
|
186
|
+
`cjk`, `arabic`, `french`, `german`, `hindi`, `indonesian`, `italian`, `portuguese`,
|
|
187
|
+
`russian`, `spanish`, `turkish`. Omitting `analyzers` uses the server default
|
|
188
|
+
`["standard"]`; an empty list is passed through and does not select that default.
|
|
189
|
+
Analyzers run independently without automatic language detection. Lists are sent
|
|
190
|
+
unchanged; avoid duplicate names, which the server rejects. Index configuration
|
|
191
|
+
validation remains in the SDK. Write tools remain disabled by default.
|
|
192
|
+
|
|
124
193
|
## Tests
|
|
125
194
|
|
|
126
195
|
```bash
|
|
@@ -133,7 +202,10 @@ npm run test:package
|
|
|
133
202
|
client to this server and exercise the installed SDK against a local HTTP fixture.
|
|
134
203
|
They cover read-only defaults, write opt-in, List/Get response validation, creation
|
|
135
204
|
HTTP 201, ref/branch forwarding, invalid combinations, pagination, and `docsUrl`
|
|
136
|
-
arrays/errors and local environment-file loading.
|
|
205
|
+
arrays/errors and local environment-file loading. Facet tests validate the published
|
|
206
|
+
MCP JSON Schema and actual tool-to-SDK HTTP path, including match-all, facet-only,
|
|
207
|
+
document+facet, omitted/null/default bucket options, boundaries, invalid requests,
|
|
208
|
+
and all 16 analyzers. They do not require credentials
|
|
137
209
|
or create remote collections. `test:package` additionally installs the actual
|
|
138
210
|
tarball in a clean consumer directory and repeats the tool contracts over real
|
|
139
211
|
stdio, checking version identity, config errors, stdout and process termination.
|
|
@@ -151,7 +223,10 @@ LAMBDADB_RUN_LIVE_TESTS=1 LAMBDADB_LIVE_CONFIRM_PROJECT=YOUR_DEV_PROJECT npm run
|
|
|
151
223
|
|
|
152
224
|
The live test creates one uniquely named temporary collection, checks real HTTP
|
|
153
225
|
201/202 responses, metadata, pagination, filters, sorting, and Branch/Tag/Alias
|
|
154
|
-
reads. It
|
|
226
|
+
reads. It also checks all 16 analyzers in collection metadata, match-all, facet-only
|
|
227
|
+
and document+facet results, default/null bucket size, keyword arrays, dotted paths,
|
|
228
|
+
and facet preservation across refs and `docsUrl` downloads. The designated server
|
|
229
|
+
must support these features. It writes two 3 MiB documents to force actual `docsUrl` array downloads
|
|
155
230
|
through the MCP tools and checks full payload integrity and download credential
|
|
156
231
|
isolation. It allows up to five minutes for committed visibility, deletes its
|
|
157
232
|
temporary collection in cleanup, and verifies that the collection is absent.
|
package/RELEASING.md
CHANGED
|
@@ -13,13 +13,13 @@ As verified on **2026-09-20 (KST)**:
|
|
|
13
13
|
- Automatic dev publication is enabled (`NPM_DEV_PUBLISH_ENABLED=true`). Eligible
|
|
14
14
|
develop pushes publish after validation; a documentation-only merge can also
|
|
15
15
|
produce a new dev version.
|
|
16
|
-
- `
|
|
17
|
-
|
|
18
|
-
published
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
`
|
|
16
|
+
- First stable release: [`v0.1.0`](https://github.com/lambdadb/lambdadb-mcp/releases/tag/v0.1.0).
|
|
17
|
+
The [release workflow](https://github.com/lambdadb/lambdadb-mcp/actions/runs/35494365745)
|
|
18
|
+
published `0.1.0` with OIDC and provenance; `latest=0.1.0`, `dev=0.1.0-dev.5`.
|
|
19
|
+
- main contains the stable release and publishing workflow. develop resumes with
|
|
20
|
+
the `0.1.1-dev.1` base; CI generates its dev counter from first-parent history.
|
|
21
|
+
Eligible develop pushes can publish the next dev version while leaving
|
|
22
|
+
`latest` on `0.1.0`.
|
|
23
23
|
- See the [validation record](https://github.com/lambdadb/lambdadb-mcp/blob/develop/docs/validation/2026-09-20-npm.md) for package,
|
|
24
24
|
provenance, and live-service evidence and their separate scopes.
|
|
25
25
|
|
package/dist/tools/read.js
CHANGED
|
@@ -2,6 +2,13 @@ import { z } from "zod";
|
|
|
2
2
|
import { createLambdaDBClient } from "../lambdadb/client.js";
|
|
3
3
|
import { formatLambdaDBError } from "../lambdadb/errors.js";
|
|
4
4
|
import { fieldsSchema, jsonResult, nameSchema, partitionFilterSchema, readOptions, readRefSchema } from "./shared.js";
|
|
5
|
+
const facetsSchema = z.record(z.string(), z.strictObject({
|
|
6
|
+
size: z.number().int().min(1).max(100).nullable().optional()
|
|
7
|
+
.describe("Maximum buckets; omitted or null uses the server default of 10.")
|
|
8
|
+
})).refine((facets) => Object.keys(facets).length <= 5, "At most five facet fields may be requested.")
|
|
9
|
+
// Zod refinements are not represented in JSON Schema without explicit metadata.
|
|
10
|
+
.meta({ maxProperties: 5 })
|
|
11
|
+
.describe("Keyword field names (including dotted paths) mapped to bucket options. Requires newly built keyword indexes on a supporting server.");
|
|
5
12
|
export function registerReadTools(server, config) {
|
|
6
13
|
server.registerTool("lambdadb_list_collections", {
|
|
7
14
|
title: "List Collections",
|
|
@@ -46,15 +53,17 @@ export function registerReadTools(server, config) {
|
|
|
46
53
|
});
|
|
47
54
|
server.registerTool("lambdadb_query_collection", {
|
|
48
55
|
title: "Query Collection",
|
|
49
|
-
description: "
|
|
56
|
+
description: "Search documents and optionally return keyword facet counts across all matches. Omit query for match-all; size: 0 requires at least one facet and returns only facets. Facets require a supporting server and newly built keyword indexes.",
|
|
50
57
|
annotations: {
|
|
51
58
|
readOnlyHint: true,
|
|
52
59
|
openWorldHint: false
|
|
53
60
|
},
|
|
54
61
|
inputSchema: z.strictObject({
|
|
55
62
|
collectionName: nameSchema,
|
|
56
|
-
size: z.number().int().min(
|
|
57
|
-
|
|
63
|
+
size: z.number().int().min(0).max(100).optional()
|
|
64
|
+
.describe("Documents to return (1–100), or 0 with nonempty facets."),
|
|
65
|
+
query: z.record(z.string(), z.any()).optional().describe("Omit for match-all."),
|
|
66
|
+
facets: facetsSchema.optional(),
|
|
58
67
|
ref: readRefSchema.optional(),
|
|
59
68
|
consistentRead: z.boolean().optional().describe("true requires a direct branch ref or omitted ref (main)."),
|
|
60
69
|
includeVectors: z.boolean().optional(),
|
|
@@ -62,12 +71,23 @@ export function registerReadTools(server, config) {
|
|
|
62
71
|
sort: z.array(z.record(z.string(), z.string().regex(/^([aA][sS][cC]|[dD][eE][sS][cC])$/))).optional(),
|
|
63
72
|
fields: fieldsSchema.optional(),
|
|
64
73
|
partitionFilter: partitionFilterSchema.optional()
|
|
74
|
+
}).superRefine((input, context) => {
|
|
75
|
+
if (input.size === 0 && Object.keys(input.facets ?? {}).length === 0) {
|
|
76
|
+
context.addIssue({ code: "custom", path: ["facets"], message: "size: 0 requires at least one facet." });
|
|
77
|
+
}
|
|
78
|
+
}).meta({
|
|
79
|
+
// Keep the cross-field rule visible to MCP clients as well as tools/call.
|
|
80
|
+
allOf: [{
|
|
81
|
+
if: { properties: { size: { const: 0 } }, required: ["size"] },
|
|
82
|
+
then: { required: ["facets"], properties: { facets: { minProperties: 1 } } }
|
|
83
|
+
}]
|
|
65
84
|
})
|
|
66
|
-
}, async ({ collectionName, size, query, ref, consistentRead, includeVectors, sort, fields, partitionFilter }) => {
|
|
85
|
+
}, async ({ collectionName, size, query, facets, ref, consistentRead, includeVectors, sort, fields, partitionFilter }) => {
|
|
67
86
|
try {
|
|
68
87
|
const client = createLambdaDBClient(config);
|
|
69
88
|
const input = {
|
|
70
89
|
query,
|
|
90
|
+
facets,
|
|
71
91
|
size,
|
|
72
92
|
...readOptions(ref, consistentRead),
|
|
73
93
|
includeVectors,
|
package/dist/tools/write.js
CHANGED
|
@@ -5,7 +5,7 @@ import { jsonResult, nameSchema, partitionFilterSchema } from "./shared.js";
|
|
|
5
5
|
export function registerWriteTools(server, config) {
|
|
6
6
|
server.registerTool("lambdadb_create_collection", {
|
|
7
7
|
title: "Create Collection",
|
|
8
|
-
description: "Create a new collection in the configured project.",
|
|
8
|
+
description: "Create a new collection in the configured project. Text index analyzers: standard, english, korean, japanese, chinese, cjk, arabic, french, german, hindi, indonesian, italian, portuguese, russian, spanish, turkish. Keyword indexes built on a supporting server support facets.",
|
|
9
9
|
annotations: {
|
|
10
10
|
openWorldHint: false
|
|
11
11
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@functional-systems/lambdadb-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1-dev.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "MCP server for LambdaDB data plane",
|
|
6
6
|
"type": "module",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"test:package": "node scripts/test-package.mjs"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@functional-systems/lambdadb": "0.
|
|
25
|
+
"@functional-systems/lambdadb": "0.6.0",
|
|
26
26
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
27
27
|
"zod": "^4.1.12"
|
|
28
28
|
},
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"access": "public",
|
|
61
61
|
"registry": "https://registry.npmjs.org"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "d1a041ed8497eb8113b616faf87b2702fb5b80c5"
|
|
64
64
|
}
|