@norbix.ai/mcp 0.2.1 → 0.4.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/README.md CHANGED
@@ -165,8 +165,8 @@ NORBIX_HUB_URL=https://hub.norbix.ai norbix-mcp --http --port 3010
165
165
  `norbix_get_integrations`, `norbix_get_integration`, `norbix_save_integration`,
166
166
  `norbix_test_integration`, `norbix_get_marketplace_integrations`,
167
167
  `norbix_save_marketplace_integration`, `norbix_get_database_schemas`,
168
- `norbix_find_documents`, `norbix_insert_document`, `norbix_update_document`,
169
- `norbix_get_taxonomy_terms`, `norbix_get_roles`, `norbix_get_policies`,
168
+ `norbix_find_documents`, `norbix_find_one_document`, `norbix_insert_document`,
169
+ `norbix_update_document`, `norbix_get_taxonomy_terms`, `norbix_get_roles`, `norbix_get_policies`,
170
170
  `norbix_get_logs`, `norbix_list_service_api_keys`.
171
171
 
172
172
  Typical flow the model follows for anything not curated:
@@ -192,7 +192,7 @@ The scheduler module switch (`enableScheduler` / `disableScheduler`) is `PUT`.
192
192
 
193
193
  ## Database tools
194
194
 
195
- Five shortcuts cover the everyday database work. Everything else in the
195
+ Six shortcuts cover the everyday database work. Everything else in the
196
196
  Database module (95 endpoints: schemas and drafts, records, taxonomies and
197
197
  terms, triggers, aggregates, database integrations) is reached with the
198
198
  generic trio.
@@ -200,13 +200,14 @@ generic trio.
200
200
  | Tool | SDK method | Route | Input |
201
201
  | --- | --- | --- | --- |
202
202
  | `norbix_get_database_schemas` | `hub.database.getDatabaseSchemas` | `GET /{version}/database/schemas` | `body` (paging) |
203
- | `norbix_find_documents` | `api.database.find` | `GET /{version}/database/collections/{collectionName}` | `body`: `collectionName`, `filter` (JSON string), `sortBy`, `pageSize`, … |
203
+ | `norbix_find_documents` | `api.database.find` | `GET /{version}/database/collections/{collectionName}` | `collectionName`, `filter?`, `sortBy?`, `sortOrder?`, `pageSize?`, `startingAfter?`, `endingBefore?`, `expandReferences?`, `databaseIntegrationId?`, `body?` (any other `FindRequest` field) |
204
+ | `norbix_find_one_document` | `api.database.findOne` | `GET /{version}/database/collections/{collectionName}/{id}` | `collectionName`, `id`, `expandReferences?`, `databaseIntegrationId?` |
204
205
  | `norbix_insert_document` | `api.database.insertOne` | `POST /{version}/database/collections/{collectionName}` | `collectionName`, `document`, `databaseIntegrationId?` |
205
- | `norbix_update_document` | `api.database.updateOne` | `PUT /{version}/database/collections/{collectionName}/{id}` | `collectionName`, `id`, `update`, `databaseIntegrationId?` |
206
+ | `norbix_update_document` | `api.database.updateOne` | `PUT /{version}/database/collections/{collectionName}/{id}` | `collectionName`, `id`, `update`, `arrayFilters?`, `databaseIntegrationId?` |
206
207
  | `norbix_get_taxonomy_terms` | `api.database.findTerms` | `GET /{version}/database/taxonomies/{taxonomyName}/terms` | `taxonomyName`, `filter?`, `pageSize?`, `sortDescending?`, `databaseIntegrationId?` |
207
208
 
208
209
  The Api record endpoints expect the document, the update and the filter as a
209
- JSON **string**. The three newer shortcuts accept an object or a string and
210
+ JSON **string**. The typed shortcuts accept an object or a string and
210
211
  send the string, so this works in one call:
211
212
 
212
213
  ```json
@@ -225,6 +226,31 @@ A `$` operator in it (`$set`, `$inc`, …) is refused with
225
226
  filter `{}` is refused (`CM-ERRORS-DATABASE-037`) unless the body also has
226
227
  `allRecords: true`.
227
228
 
229
+ **References.** A `user`, `role`, `taxonomy` (term), `collection` or `file`
230
+ field stores ids. Pass `expandReferences: true` to `norbix_find_documents` or
231
+ `norbix_find_one_document` and each such field comes back as
232
+ `{ "id": "…", "display": … }` (an array of them when the field is multiple):
233
+
234
+ ```json
235
+ { "name": "norbix_find_one_document", "arguments": {
236
+ "collectionName": "posts", "id": "…", "expandReferences": true } }
237
+ ```
238
+
239
+ ```json
240
+ { "author": { "id": "usr_…", "display": "Jane Doe" },
241
+ "tags": [ { "id": "6650…", "display": { "title": { "en": "News" }, "slug": "news" } },
242
+ { "id": "6651…", "display": null } ] }
243
+ ```
244
+
245
+ `display` is the target's `displayField` (a user property, a role name, a
246
+ term's title and slug, a record's chosen field). It is `null` when the target
247
+ is gone **or** when your API key may not read the target — the two cases look
248
+ the same on purpose. Default is off: the stored ids only.
249
+
250
+ **Arrays inside a document.** `norbix_update_document` takes `arrayFilters`
251
+ for positional paths: `update: { "items.$[i].qty": 2 }` with
252
+ `arrayFilters: [ { "i.sku": "A1" } ]`.
253
+
228
254
  For anything else, search the `database` group:
229
255
 
230
256
  - `norbix_search_endpoints({ query: "taxonomy term", group: "database" })`
@@ -275,6 +301,12 @@ is written as `feat(...)` with a `Breaking: <what>` line in the body (a
275
301
  is the source of truth for the version; release notes are on the GitHub
276
302
  Releases page.
277
303
 
304
+ The commit analyzer reads only the **start** of each subject, so a step
305
+ number goes at the end (`feat(database): expand references — step 2`),
306
+ never in front of the type: `[2] feat(database): …` is read as "no
307
+ release". Pull request 10 (the schema-content contract) shipped that way
308
+ and needed this follow-up commit to publish 0.3.0.
309
+
278
310
  ## Security notes
279
311
 
280
312
  - The server can do exactly what the API key can do — nothing more. Scope the
@@ -7,6 +7,10 @@
7
7
  "base": null,
8
8
  "fields": []
9
9
  },
10
+ "IGet": {
11
+ "base": null,
12
+ "fields": []
13
+ },
10
14
  "IHasSessionId": {
11
15
  "base": null,
12
16
  "fields": [
@@ -410,6 +414,36 @@
410
414
  }
411
415
  ]
412
416
  },
417
+ "EchoAgentSnippetDto": {
418
+ "base": null,
419
+ "fields": [
420
+ {
421
+ "name": "client",
422
+ "type": "string",
423
+ "optional": false
424
+ },
425
+ {
426
+ "name": "kind",
427
+ "type": "string",
428
+ "optional": false
429
+ },
430
+ {
431
+ "name": "recommended",
432
+ "type": "boolean",
433
+ "optional": false
434
+ },
435
+ {
436
+ "name": "auth",
437
+ "type": "string",
438
+ "optional": false
439
+ },
440
+ {
441
+ "name": "config",
442
+ "type": "string",
443
+ "optional": false
444
+ }
445
+ ]
446
+ },
413
447
  "EchoAgentDto": {
414
448
  "base": null,
415
449
  "fields": [
@@ -437,6 +471,46 @@
437
471
  "name": "toolsUrl",
438
472
  "type": "string",
439
473
  "optional": false
474
+ },
475
+ {
476
+ "name": "cliPackage",
477
+ "type": "string",
478
+ "optional": false
479
+ },
480
+ {
481
+ "name": "cliInstallCommand",
482
+ "type": "string",
483
+ "optional": false
484
+ },
485
+ {
486
+ "name": "deviceAuthorizationUrl",
487
+ "type": "string",
488
+ "optional": false
489
+ },
490
+ {
491
+ "name": "deviceTokenUrl",
492
+ "type": "string",
493
+ "optional": false
494
+ },
495
+ {
496
+ "name": "snippets",
497
+ "type": "EchoAgentSnippetDto[] = []",
498
+ "optional": false
499
+ }
500
+ ]
501
+ },
502
+ "EchoHostingPlatformDto": {
503
+ "base": null,
504
+ "fields": [
505
+ {
506
+ "name": "provider",
507
+ "type": "string",
508
+ "optional": false
509
+ },
510
+ {
511
+ "name": "isAws",
512
+ "type": "boolean",
513
+ "optional": false
440
514
  }
441
515
  ]
442
516
  },
@@ -1183,6 +1257,11 @@
1183
1257
  "type": "{ [index: string]: string }",
1184
1258
  "optional": true
1185
1259
  },
1260
+ {
1261
+ "name": "slug",
1262
+ "type": "string",
1263
+ "optional": true
1264
+ },
1186
1265
  {
1187
1266
  "name": "description",
1188
1267
  "type": "string",
@@ -1283,6 +1362,11 @@
1283
1362
  "type": "{ [index: string]: string }",
1284
1363
  "optional": true
1285
1364
  },
1365
+ {
1366
+ "name": "slug",
1367
+ "type": "string",
1368
+ "optional": true
1369
+ },
1286
1370
  {
1287
1371
  "name": "description",
1288
1372
  "type": "string",
@@ -1571,7 +1655,7 @@
1571
1655
  {
1572
1656
  "name": "id",
1573
1657
  "type": "string",
1574
- "optional": false
1658
+ "optional": true
1575
1659
  },
1576
1660
  {
1577
1661
  "name": "originalFileName",
@@ -1791,6 +1875,16 @@
1791
1875
  "name": "translateOptions",
1792
1876
  "type": "IReadOnlyDictionary<string, string>",
1793
1877
  "optional": true
1878
+ },
1879
+ {
1880
+ "name": "default",
1881
+ "type": "string",
1882
+ "optional": true
1883
+ },
1884
+ {
1885
+ "name": "unique",
1886
+ "type": "boolean",
1887
+ "optional": true
1794
1888
  }
1795
1889
  ]
1796
1890
  },
@@ -1811,6 +1905,31 @@
1811
1905
  "name": "multipleOf",
1812
1906
  "type": "number",
1813
1907
  "optional": true
1908
+ },
1909
+ {
1910
+ "name": "default",
1911
+ "type": "number",
1912
+ "optional": true
1913
+ },
1914
+ {
1915
+ "name": "unique",
1916
+ "type": "boolean",
1917
+ "optional": true
1918
+ }
1919
+ ]
1920
+ },
1921
+ "CurrencyDefaultDto": {
1922
+ "base": null,
1923
+ "fields": [
1924
+ {
1925
+ "name": "value",
1926
+ "type": "number",
1927
+ "optional": false
1928
+ },
1929
+ {
1930
+ "name": "currency",
1931
+ "type": "string",
1932
+ "optional": false
1814
1933
  }
1815
1934
  ]
1816
1935
  },
@@ -1821,12 +1940,38 @@
1821
1940
  "name": "allowedCurrencies",
1822
1941
  "type": "IReadOnlyList<string>",
1823
1942
  "optional": true
1943
+ },
1944
+ {
1945
+ "name": "multipleOf",
1946
+ "type": "number",
1947
+ "optional": true
1948
+ },
1949
+ {
1950
+ "name": "minimum",
1951
+ "type": "number",
1952
+ "optional": true
1953
+ },
1954
+ {
1955
+ "name": "maximum",
1956
+ "type": "number",
1957
+ "optional": true
1958
+ },
1959
+ {
1960
+ "name": "default",
1961
+ "type": "CurrencyDefaultDto",
1962
+ "optional": true
1824
1963
  }
1825
1964
  ]
1826
1965
  },
1827
1966
  "BooleanFieldDto": {
1828
1967
  "base": "JsonSchemaFieldDto",
1829
- "fields": []
1968
+ "fields": [
1969
+ {
1970
+ "name": "default",
1971
+ "type": "boolean",
1972
+ "optional": true
1973
+ }
1974
+ ]
1830
1975
  },
1831
1976
  "DateFieldDto": {
1832
1977
  "base": "JsonSchemaFieldDto",
@@ -1840,6 +1985,11 @@
1840
1985
  "name": "maximum",
1841
1986
  "type": "number",
1842
1987
  "optional": true
1988
+ },
1989
+ {
1990
+ "name": "default",
1991
+ "type": "number",
1992
+ "optional": true
1843
1993
  }
1844
1994
  ]
1845
1995
  },
@@ -1855,6 +2005,16 @@
1855
2005
  "name": "maximum",
1856
2006
  "type": "number",
1857
2007
  "optional": true
2008
+ },
2009
+ {
2010
+ "name": "default",
2011
+ "type": "number",
2012
+ "optional": true
2013
+ },
2014
+ {
2015
+ "name": "unique",
2016
+ "type": "boolean",
2017
+ "optional": true
1858
2018
  }
1859
2019
  ]
1860
2020
  },
@@ -1870,7 +2030,23 @@
1870
2030
  },
1871
2031
  "TagsFieldDto": {
1872
2032
  "base": "JsonSchemaFieldDto",
1873
- "fields": []
2033
+ "fields": [
2034
+ {
2035
+ "name": "minItems",
2036
+ "type": "number",
2037
+ "optional": true
2038
+ },
2039
+ {
2040
+ "name": "maxItems",
2041
+ "type": "number",
2042
+ "optional": true
2043
+ },
2044
+ {
2045
+ "name": "default",
2046
+ "type": "IReadOnlyList<string>",
2047
+ "optional": true
2048
+ }
2049
+ ]
1874
2050
  },
1875
2051
  "FileFieldDto": {
1876
2052
  "base": "JsonSchemaFieldDto",
@@ -1879,6 +2055,26 @@
1879
2055
  "name": "storages",
1880
2056
  "type": "IReadOnlyList<string>",
1881
2057
  "optional": true
2058
+ },
2059
+ {
2060
+ "name": "minItems",
2061
+ "type": "number",
2062
+ "optional": true
2063
+ },
2064
+ {
2065
+ "name": "maxItems",
2066
+ "type": "number",
2067
+ "optional": true
2068
+ },
2069
+ {
2070
+ "name": "allowedFileType",
2071
+ "type": "string",
2072
+ "optional": true
2073
+ },
2074
+ {
2075
+ "name": "maxSizeMb",
2076
+ "type": "number",
2077
+ "optional": true
1882
2078
  }
1883
2079
  ]
1884
2080
  },
@@ -1894,6 +2090,11 @@
1894
2090
  "name": "multiple",
1895
2091
  "type": "boolean",
1896
2092
  "optional": false
2093
+ },
2094
+ {
2095
+ "name": "displayField",
2096
+ "type": "string",
2097
+ "optional": true
1897
2098
  }
1898
2099
  ]
1899
2100
  },
@@ -1924,6 +2125,11 @@
1924
2125
  "name": "multiple",
1925
2126
  "type": "boolean",
1926
2127
  "optional": false
2128
+ },
2129
+ {
2130
+ "name": "displayField",
2131
+ "type": "string",
2132
+ "optional": true
1927
2133
  }
1928
2134
  ]
1929
2135
  },
@@ -1934,6 +2140,11 @@
1934
2140
  "name": "multiple",
1935
2141
  "type": "boolean",
1936
2142
  "optional": false
2143
+ },
2144
+ {
2145
+ "name": "displayField",
2146
+ "type": "string",
2147
+ "optional": true
1937
2148
  }
1938
2149
  ]
1939
2150
  },
@@ -1949,6 +2160,61 @@
1949
2160
  "name": "multiple",
1950
2161
  "type": "boolean",
1951
2162
  "optional": false
2163
+ },
2164
+ {
2165
+ "name": "default",
2166
+ "type": "IReadOnlyList<string>",
2167
+ "optional": true
2168
+ }
2169
+ ]
2170
+ },
2171
+ "ObjectFieldDto": {
2172
+ "base": "JsonSchemaFieldDto",
2173
+ "fields": [
2174
+ {
2175
+ "name": "properties",
2176
+ "type": "IReadOnlyList<JsonSchemaFieldDto>",
2177
+ "optional": false
2178
+ },
2179
+ {
2180
+ "name": "required",
2181
+ "type": "IReadOnlyList<string>",
2182
+ "optional": true
2183
+ }
2184
+ ]
2185
+ },
2186
+ "ArrayFieldDto": {
2187
+ "base": "JsonSchemaFieldDto",
2188
+ "fields": [
2189
+ {
2190
+ "name": "items",
2191
+ "type": "JsonSchemaFieldDto",
2192
+ "optional": false
2193
+ },
2194
+ {
2195
+ "name": "minItems",
2196
+ "type": "number",
2197
+ "optional": true
2198
+ },
2199
+ {
2200
+ "name": "maxItems",
2201
+ "type": "number",
2202
+ "optional": true
2203
+ },
2204
+ {
2205
+ "name": "uniqueItems",
2206
+ "type": "boolean",
2207
+ "optional": true
2208
+ }
2209
+ ]
2210
+ },
2211
+ "JsonFieldDto": {
2212
+ "base": "JsonSchemaFieldDto",
2213
+ "fields": [
2214
+ {
2215
+ "name": "maxBytes",
2216
+ "type": "number",
2217
+ "optional": true
1952
2218
  }
1953
2219
  ]
1954
2220
  },
@@ -2069,6 +2335,11 @@
2069
2335
  "name": "agent",
2070
2336
  "type": "EchoAgentDto",
2071
2337
  "optional": true
2338
+ },
2339
+ {
2340
+ "name": "hostingPlatform",
2341
+ "type": "EchoHostingPlatformDto",
2342
+ "optional": true
2072
2343
  }
2073
2344
  ]
2074
2345
  },
@@ -2535,6 +2806,26 @@
2535
2806
  }
2536
2807
  ]
2537
2808
  },
2809
+ "GetFileByIdResponse": {
2810
+ "base": "ResponseBase",
2811
+ "fields": [
2812
+ {
2813
+ "name": "file",
2814
+ "type": "FileResourceRefDto",
2815
+ "optional": true
2816
+ },
2817
+ {
2818
+ "name": "isPublic",
2819
+ "type": "boolean",
2820
+ "optional": true
2821
+ },
2822
+ {
2823
+ "name": "publicUrl",
2824
+ "type": "string",
2825
+ "optional": true
2826
+ }
2827
+ ]
2828
+ },
2538
2829
  "GetFileInfoResponse": {
2539
2830
  "base": "ResponseBase",
2540
2831
  "fields": [
@@ -3986,6 +4277,11 @@
3986
4277
  "name": "sortOrder",
3987
4278
  "type": "number",
3988
4279
  "optional": true
4280
+ },
4281
+ {
4282
+ "name": "expandReferences",
4283
+ "type": "boolean",
4284
+ "optional": false
3989
4285
  }
3990
4286
  ]
3991
4287
  },
@@ -4006,6 +4302,11 @@
4006
4302
  "name": "databaseIntegrationId",
4007
4303
  "type": "string",
4008
4304
  "optional": true
4305
+ },
4306
+ {
4307
+ "name": "expandReferences",
4308
+ "type": "boolean",
4309
+ "optional": false
4009
4310
  }
4010
4311
  ]
4011
4312
  },
@@ -4036,6 +4337,11 @@
4036
4337
  "name": "pagingArgs",
4037
4338
  "type": "PagingArgs",
4038
4339
  "optional": true
4340
+ },
4341
+ {
4342
+ "name": "expandReferences",
4343
+ "type": "boolean",
4344
+ "optional": false
4039
4345
  }
4040
4346
  ]
4041
4347
  },
@@ -4131,6 +4437,11 @@
4131
4437
  "name": "update",
4132
4438
  "type": "string",
4133
4439
  "optional": false
4440
+ },
4441
+ {
4442
+ "name": "arrayFilters",
4443
+ "type": "string",
4444
+ "optional": true
4134
4445
  }
4135
4446
  ]
4136
4447
  },
@@ -4156,6 +4467,11 @@
4156
4467
  "name": "update",
4157
4468
  "type": "string",
4158
4469
  "optional": false
4470
+ },
4471
+ {
4472
+ "name": "arrayFilters",
4473
+ "type": "string",
4474
+ "optional": true
4159
4475
  }
4160
4476
  ]
4161
4477
  },
@@ -4274,6 +4590,21 @@
4274
4590
  }
4275
4591
  ]
4276
4592
  },
4593
+ "GetFileByIdRequest": {
4594
+ "base": "CodeMashRequestBase",
4595
+ "fields": [
4596
+ {
4597
+ "name": "filesIntegrationId",
4598
+ "type": "string",
4599
+ "optional": false
4600
+ },
4601
+ {
4602
+ "name": "id",
4603
+ "type": "string",
4604
+ "optional": false
4605
+ }
4606
+ ]
4607
+ },
4277
4608
  "GetFileInfoRequest": {
4278
4609
  "base": "CodeMashRequestBase",
4279
4610
  "fields": [
@@ -4374,6 +4705,21 @@
4374
4705
  }
4375
4706
  ]
4376
4707
  },
4708
+ "UseFileRequest": {
4709
+ "base": "CodeMashRequestBase",
4710
+ "fields": [
4711
+ {
4712
+ "name": "filesIntegrationId",
4713
+ "type": "string",
4714
+ "optional": false
4715
+ },
4716
+ {
4717
+ "name": "path",
4718
+ "type": "string",
4719
+ "optional": false
4720
+ }
4721
+ ]
4722
+ },
4377
4723
  "Authenticate": {
4378
4724
  "base": null,
4379
4725
  "fields": [