@llamaindex/llama-cloud-mcp 1.3.0 → 1.5.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.
Files changed (60) hide show
  1. package/code-tool.d.mts +4 -1
  2. package/code-tool.d.mts.map +1 -1
  3. package/code-tool.d.ts +4 -1
  4. package/code-tool.d.ts.map +1 -1
  5. package/code-tool.js +14 -1
  6. package/code-tool.js.map +1 -1
  7. package/code-tool.mjs +14 -1
  8. package/code-tool.mjs.map +1 -1
  9. package/http.d.mts +7 -2
  10. package/http.d.mts.map +1 -1
  11. package/http.d.ts +7 -2
  12. package/http.d.ts.map +1 -1
  13. package/http.js +25 -10
  14. package/http.js.map +1 -1
  15. package/http.mjs +25 -10
  16. package/http.mjs.map +1 -1
  17. package/index.js +6 -2
  18. package/index.js.map +1 -1
  19. package/index.mjs +6 -2
  20. package/index.mjs.map +1 -1
  21. package/methods.d.mts +10 -0
  22. package/methods.d.mts.map +1 -0
  23. package/methods.d.ts +10 -0
  24. package/methods.d.ts.map +1 -0
  25. package/methods.js +790 -0
  26. package/methods.js.map +1 -0
  27. package/methods.mjs +786 -0
  28. package/methods.mjs.map +1 -0
  29. package/options.d.mts +4 -0
  30. package/options.d.mts.map +1 -1
  31. package/options.d.ts +4 -0
  32. package/options.d.ts.map +1 -1
  33. package/options.js +30 -12
  34. package/options.js.map +1 -1
  35. package/options.mjs +30 -12
  36. package/options.mjs.map +1 -1
  37. package/package.json +13 -2
  38. package/server.d.mts +2 -3
  39. package/server.d.mts.map +1 -1
  40. package/server.d.ts +2 -3
  41. package/server.d.ts.map +1 -1
  42. package/server.js +40 -8
  43. package/server.js.map +1 -1
  44. package/server.mjs +39 -7
  45. package/server.mjs.map +1 -1
  46. package/src/code-tool.ts +20 -1
  47. package/src/http.ts +33 -10
  48. package/src/index.ts +6 -2
  49. package/src/methods.ts +810 -0
  50. package/src/options.ts +37 -12
  51. package/src/server.ts +49 -8
  52. package/src/stdio.ts +4 -3
  53. package/stdio.d.mts +2 -1
  54. package/stdio.d.mts.map +1 -1
  55. package/stdio.d.ts +2 -1
  56. package/stdio.d.ts.map +1 -1
  57. package/stdio.js +3 -3
  58. package/stdio.js.map +1 -1
  59. package/stdio.mjs +3 -3
  60. package/stdio.mjs.map +1 -1
package/src/methods.ts ADDED
@@ -0,0 +1,810 @@
1
+ import { McpOptions } from './options';
2
+
3
+ export type SdkMethod = {
4
+ clientCallName: string;
5
+ fullyQualifiedName: string;
6
+ httpMethod?: 'get' | 'post' | 'put' | 'patch' | 'delete' | 'query';
7
+ httpPath?: string;
8
+ };
9
+
10
+ export const sdkMethods: SdkMethod[] = [
11
+ {
12
+ clientCallName: 'client.files.create',
13
+ fullyQualifiedName: 'files.create',
14
+ httpMethod: 'post',
15
+ httpPath: '/api/v1/beta/files',
16
+ },
17
+ {
18
+ clientCallName: 'client.files.list',
19
+ fullyQualifiedName: 'files.list',
20
+ httpMethod: 'get',
21
+ httpPath: '/api/v1/beta/files',
22
+ },
23
+ {
24
+ clientCallName: 'client.files.delete',
25
+ fullyQualifiedName: 'files.delete',
26
+ httpMethod: 'delete',
27
+ httpPath: '/api/v1/beta/files/{file_id}',
28
+ },
29
+ {
30
+ clientCallName: 'client.files.get',
31
+ fullyQualifiedName: 'files.get',
32
+ httpMethod: 'get',
33
+ httpPath: '/api/v1/beta/files/{file_id}/content',
34
+ },
35
+ {
36
+ clientCallName: 'client.files.query',
37
+ fullyQualifiedName: 'files.query',
38
+ httpMethod: 'post',
39
+ httpPath: '/api/v1/beta/files/query',
40
+ },
41
+ {
42
+ clientCallName: 'client.parsing.create',
43
+ fullyQualifiedName: 'parsing.create',
44
+ httpMethod: 'post',
45
+ httpPath: '/api/v2/parse',
46
+ },
47
+ {
48
+ clientCallName: 'client.parsing.list',
49
+ fullyQualifiedName: 'parsing.list',
50
+ httpMethod: 'get',
51
+ httpPath: '/api/v2/parse',
52
+ },
53
+ {
54
+ clientCallName: 'client.parsing.get',
55
+ fullyQualifiedName: 'parsing.get',
56
+ httpMethod: 'get',
57
+ httpPath: '/api/v2/parse/{job_id}',
58
+ },
59
+ {
60
+ clientCallName: 'client.extraction.run',
61
+ fullyQualifiedName: 'extraction.run',
62
+ httpMethod: 'post',
63
+ httpPath: '/api/v1/extraction/run',
64
+ },
65
+ {
66
+ clientCallName: 'client.extraction.jobs.create',
67
+ fullyQualifiedName: 'extraction.jobs.create',
68
+ httpMethod: 'post',
69
+ httpPath: '/api/v1/extraction/jobs',
70
+ },
71
+ {
72
+ clientCallName: 'client.extraction.jobs.list',
73
+ fullyQualifiedName: 'extraction.jobs.list',
74
+ httpMethod: 'get',
75
+ httpPath: '/api/v1/extraction/jobs',
76
+ },
77
+ {
78
+ clientCallName: 'client.extraction.jobs.file',
79
+ fullyQualifiedName: 'extraction.jobs.file',
80
+ httpMethod: 'post',
81
+ httpPath: '/api/v1/extraction/jobs/file',
82
+ },
83
+ {
84
+ clientCallName: 'client.extraction.jobs.get',
85
+ fullyQualifiedName: 'extraction.jobs.get',
86
+ httpMethod: 'get',
87
+ httpPath: '/api/v1/extraction/jobs/{job_id}',
88
+ },
89
+ {
90
+ clientCallName: 'client.extraction.jobs.getResult',
91
+ fullyQualifiedName: 'extraction.jobs.getResult',
92
+ httpMethod: 'get',
93
+ httpPath: '/api/v1/extraction/jobs/{job_id}/result',
94
+ },
95
+ {
96
+ clientCallName: 'client.extraction.runs.list',
97
+ fullyQualifiedName: 'extraction.runs.list',
98
+ httpMethod: 'get',
99
+ httpPath: '/api/v1/extraction/runs',
100
+ },
101
+ {
102
+ clientCallName: 'client.extraction.runs.delete',
103
+ fullyQualifiedName: 'extraction.runs.delete',
104
+ httpMethod: 'delete',
105
+ httpPath: '/api/v1/extraction/runs/{run_id}',
106
+ },
107
+ {
108
+ clientCallName: 'client.extraction.runs.get',
109
+ fullyQualifiedName: 'extraction.runs.get',
110
+ httpMethod: 'get',
111
+ httpPath: '/api/v1/extraction/runs/{run_id}',
112
+ },
113
+ {
114
+ clientCallName: 'client.extraction.runs.getByJob',
115
+ fullyQualifiedName: 'extraction.runs.getByJob',
116
+ httpMethod: 'get',
117
+ httpPath: '/api/v1/extraction/runs/by-job/{job_id}',
118
+ },
119
+ {
120
+ clientCallName: 'client.extraction.extractionAgents.create',
121
+ fullyQualifiedName: 'extraction.extractionAgents.create',
122
+ httpMethod: 'post',
123
+ httpPath: '/api/v1/extraction/extraction-agents',
124
+ },
125
+ {
126
+ clientCallName: 'client.extraction.extractionAgents.update',
127
+ fullyQualifiedName: 'extraction.extractionAgents.update',
128
+ httpMethod: 'put',
129
+ httpPath: '/api/v1/extraction/extraction-agents/{extraction_agent_id}',
130
+ },
131
+ {
132
+ clientCallName: 'client.extraction.extractionAgents.list',
133
+ fullyQualifiedName: 'extraction.extractionAgents.list',
134
+ httpMethod: 'get',
135
+ httpPath: '/api/v1/extraction/extraction-agents',
136
+ },
137
+ {
138
+ clientCallName: 'client.extraction.extractionAgents.delete',
139
+ fullyQualifiedName: 'extraction.extractionAgents.delete',
140
+ httpMethod: 'delete',
141
+ httpPath: '/api/v1/extraction/extraction-agents/{extraction_agent_id}',
142
+ },
143
+ {
144
+ clientCallName: 'client.extraction.extractionAgents.get',
145
+ fullyQualifiedName: 'extraction.extractionAgents.get',
146
+ httpMethod: 'get',
147
+ httpPath: '/api/v1/extraction/extraction-agents/{extraction_agent_id}',
148
+ },
149
+ {
150
+ clientCallName: 'client.extraction.extractionAgents.schema.generateSchema',
151
+ fullyQualifiedName: 'extraction.extractionAgents.schema.generateSchema',
152
+ httpMethod: 'post',
153
+ httpPath: '/api/v1/extraction/extraction-agents/schema/generate',
154
+ },
155
+ {
156
+ clientCallName: 'client.extraction.extractionAgents.schema.validateSchema',
157
+ fullyQualifiedName: 'extraction.extractionAgents.schema.validateSchema',
158
+ httpMethod: 'post',
159
+ httpPath: '/api/v1/extraction/extraction-agents/schema/validation',
160
+ },
161
+ {
162
+ clientCallName: 'client.classifier.jobs.create',
163
+ fullyQualifiedName: 'classifier.jobs.create',
164
+ httpMethod: 'post',
165
+ httpPath: '/api/v1/classifier/jobs',
166
+ },
167
+ {
168
+ clientCallName: 'client.classifier.jobs.list',
169
+ fullyQualifiedName: 'classifier.jobs.list',
170
+ httpMethod: 'get',
171
+ httpPath: '/api/v1/classifier/jobs',
172
+ },
173
+ {
174
+ clientCallName: 'client.classifier.jobs.get',
175
+ fullyQualifiedName: 'classifier.jobs.get',
176
+ httpMethod: 'get',
177
+ httpPath: '/api/v1/classifier/jobs/{classify_job_id}',
178
+ },
179
+ {
180
+ clientCallName: 'client.classifier.jobs.getResults',
181
+ fullyQualifiedName: 'classifier.jobs.getResults',
182
+ httpMethod: 'get',
183
+ httpPath: '/api/v1/classifier/jobs/{classify_job_id}/results',
184
+ },
185
+ {
186
+ clientCallName: 'client.projects.list',
187
+ fullyQualifiedName: 'projects.list',
188
+ httpMethod: 'get',
189
+ httpPath: '/api/v1/projects',
190
+ },
191
+ {
192
+ clientCallName: 'client.projects.get',
193
+ fullyQualifiedName: 'projects.get',
194
+ httpMethod: 'get',
195
+ httpPath: '/api/v1/projects/{project_id}',
196
+ },
197
+ {
198
+ clientCallName: 'client.dataSinks.create',
199
+ fullyQualifiedName: 'dataSinks.create',
200
+ httpMethod: 'post',
201
+ httpPath: '/api/v1/data-sinks',
202
+ },
203
+ {
204
+ clientCallName: 'client.dataSinks.update',
205
+ fullyQualifiedName: 'dataSinks.update',
206
+ httpMethod: 'put',
207
+ httpPath: '/api/v1/data-sinks/{data_sink_id}',
208
+ },
209
+ {
210
+ clientCallName: 'client.dataSinks.list',
211
+ fullyQualifiedName: 'dataSinks.list',
212
+ httpMethod: 'get',
213
+ httpPath: '/api/v1/data-sinks',
214
+ },
215
+ {
216
+ clientCallName: 'client.dataSinks.delete',
217
+ fullyQualifiedName: 'dataSinks.delete',
218
+ httpMethod: 'delete',
219
+ httpPath: '/api/v1/data-sinks/{data_sink_id}',
220
+ },
221
+ {
222
+ clientCallName: 'client.dataSinks.get',
223
+ fullyQualifiedName: 'dataSinks.get',
224
+ httpMethod: 'get',
225
+ httpPath: '/api/v1/data-sinks/{data_sink_id}',
226
+ },
227
+ {
228
+ clientCallName: 'client.dataSources.create',
229
+ fullyQualifiedName: 'dataSources.create',
230
+ httpMethod: 'post',
231
+ httpPath: '/api/v1/data-sources',
232
+ },
233
+ {
234
+ clientCallName: 'client.dataSources.update',
235
+ fullyQualifiedName: 'dataSources.update',
236
+ httpMethod: 'put',
237
+ httpPath: '/api/v1/data-sources/{data_source_id}',
238
+ },
239
+ {
240
+ clientCallName: 'client.dataSources.list',
241
+ fullyQualifiedName: 'dataSources.list',
242
+ httpMethod: 'get',
243
+ httpPath: '/api/v1/data-sources',
244
+ },
245
+ {
246
+ clientCallName: 'client.dataSources.delete',
247
+ fullyQualifiedName: 'dataSources.delete',
248
+ httpMethod: 'delete',
249
+ httpPath: '/api/v1/data-sources/{data_source_id}',
250
+ },
251
+ {
252
+ clientCallName: 'client.dataSources.get',
253
+ fullyQualifiedName: 'dataSources.get',
254
+ httpMethod: 'get',
255
+ httpPath: '/api/v1/data-sources/{data_source_id}',
256
+ },
257
+ {
258
+ clientCallName: 'client.pipelines.create',
259
+ fullyQualifiedName: 'pipelines.create',
260
+ httpMethod: 'post',
261
+ httpPath: '/api/v1/pipelines',
262
+ },
263
+ {
264
+ clientCallName: 'client.pipelines.retrieve',
265
+ fullyQualifiedName: 'pipelines.retrieve',
266
+ httpMethod: 'post',
267
+ httpPath: '/api/v1/pipelines/{pipeline_id}/retrieve',
268
+ },
269
+ {
270
+ clientCallName: 'client.pipelines.update',
271
+ fullyQualifiedName: 'pipelines.update',
272
+ httpMethod: 'put',
273
+ httpPath: '/api/v1/pipelines/{pipeline_id}',
274
+ },
275
+ {
276
+ clientCallName: 'client.pipelines.list',
277
+ fullyQualifiedName: 'pipelines.list',
278
+ httpMethod: 'get',
279
+ httpPath: '/api/v1/pipelines',
280
+ },
281
+ {
282
+ clientCallName: 'client.pipelines.delete',
283
+ fullyQualifiedName: 'pipelines.delete',
284
+ httpMethod: 'delete',
285
+ httpPath: '/api/v1/pipelines/{pipeline_id}',
286
+ },
287
+ {
288
+ clientCallName: 'client.pipelines.get',
289
+ fullyQualifiedName: 'pipelines.get',
290
+ httpMethod: 'get',
291
+ httpPath: '/api/v1/pipelines/{pipeline_id}',
292
+ },
293
+ {
294
+ clientCallName: 'client.pipelines.getStatus',
295
+ fullyQualifiedName: 'pipelines.getStatus',
296
+ httpMethod: 'get',
297
+ httpPath: '/api/v1/pipelines/{pipeline_id}/status',
298
+ },
299
+ {
300
+ clientCallName: 'client.pipelines.upsert',
301
+ fullyQualifiedName: 'pipelines.upsert',
302
+ httpMethod: 'put',
303
+ httpPath: '/api/v1/pipelines',
304
+ },
305
+ {
306
+ clientCallName: 'client.pipelines.sync.create',
307
+ fullyQualifiedName: 'pipelines.sync.create',
308
+ httpMethod: 'post',
309
+ httpPath: '/api/v1/pipelines/{pipeline_id}/sync',
310
+ },
311
+ {
312
+ clientCallName: 'client.pipelines.sync.cancel',
313
+ fullyQualifiedName: 'pipelines.sync.cancel',
314
+ httpMethod: 'post',
315
+ httpPath: '/api/v1/pipelines/{pipeline_id}/sync/cancel',
316
+ },
317
+ {
318
+ clientCallName: 'client.pipelines.dataSources.update',
319
+ fullyQualifiedName: 'pipelines.dataSources.update',
320
+ httpMethod: 'put',
321
+ httpPath: '/api/v1/pipelines/{pipeline_id}/data-sources/{data_source_id}',
322
+ },
323
+ {
324
+ clientCallName: 'client.pipelines.dataSources.getDataSources',
325
+ fullyQualifiedName: 'pipelines.dataSources.getDataSources',
326
+ httpMethod: 'get',
327
+ httpPath: '/api/v1/pipelines/{pipeline_id}/data-sources',
328
+ },
329
+ {
330
+ clientCallName: 'client.pipelines.dataSources.getStatus',
331
+ fullyQualifiedName: 'pipelines.dataSources.getStatus',
332
+ httpMethod: 'get',
333
+ httpPath: '/api/v1/pipelines/{pipeline_id}/data-sources/{data_source_id}/status',
334
+ },
335
+ {
336
+ clientCallName: 'client.pipelines.dataSources.sync',
337
+ fullyQualifiedName: 'pipelines.dataSources.sync',
338
+ httpMethod: 'post',
339
+ httpPath: '/api/v1/pipelines/{pipeline_id}/data-sources/{data_source_id}/sync',
340
+ },
341
+ {
342
+ clientCallName: 'client.pipelines.dataSources.updateDataSources',
343
+ fullyQualifiedName: 'pipelines.dataSources.updateDataSources',
344
+ httpMethod: 'put',
345
+ httpPath: '/api/v1/pipelines/{pipeline_id}/data-sources',
346
+ },
347
+ {
348
+ clientCallName: 'client.pipelines.images.getPageFigure',
349
+ fullyQualifiedName: 'pipelines.images.getPageFigure',
350
+ httpMethod: 'get',
351
+ httpPath: '/api/v1/files/{id}/page-figures/{page_index}/{figure_name}',
352
+ },
353
+ {
354
+ clientCallName: 'client.pipelines.images.getPageScreenshot',
355
+ fullyQualifiedName: 'pipelines.images.getPageScreenshot',
356
+ httpMethod: 'get',
357
+ httpPath: '/api/v1/files/{id}/page_screenshots/{page_index}',
358
+ },
359
+ {
360
+ clientCallName: 'client.pipelines.images.listPageFigures',
361
+ fullyQualifiedName: 'pipelines.images.listPageFigures',
362
+ httpMethod: 'get',
363
+ httpPath: '/api/v1/files/{id}/page-figures',
364
+ },
365
+ {
366
+ clientCallName: 'client.pipelines.images.listPageScreenshots',
367
+ fullyQualifiedName: 'pipelines.images.listPageScreenshots',
368
+ httpMethod: 'get',
369
+ httpPath: '/api/v1/files/{id}/page_screenshots',
370
+ },
371
+ {
372
+ clientCallName: 'client.pipelines.files.create',
373
+ fullyQualifiedName: 'pipelines.files.create',
374
+ httpMethod: 'put',
375
+ httpPath: '/api/v1/pipelines/{pipeline_id}/files',
376
+ },
377
+ {
378
+ clientCallName: 'client.pipelines.files.update',
379
+ fullyQualifiedName: 'pipelines.files.update',
380
+ httpMethod: 'put',
381
+ httpPath: '/api/v1/pipelines/{pipeline_id}/files/{file_id}',
382
+ },
383
+ {
384
+ clientCallName: 'client.pipelines.files.list',
385
+ fullyQualifiedName: 'pipelines.files.list',
386
+ httpMethod: 'get',
387
+ httpPath: '/api/v1/pipelines/{pipeline_id}/files2',
388
+ },
389
+ {
390
+ clientCallName: 'client.pipelines.files.delete',
391
+ fullyQualifiedName: 'pipelines.files.delete',
392
+ httpMethod: 'delete',
393
+ httpPath: '/api/v1/pipelines/{pipeline_id}/files/{file_id}',
394
+ },
395
+ {
396
+ clientCallName: 'client.pipelines.files.getStatus',
397
+ fullyQualifiedName: 'pipelines.files.getStatus',
398
+ httpMethod: 'get',
399
+ httpPath: '/api/v1/pipelines/{pipeline_id}/files/{file_id}/status',
400
+ },
401
+ {
402
+ clientCallName: 'client.pipelines.files.getStatusCounts',
403
+ fullyQualifiedName: 'pipelines.files.getStatusCounts',
404
+ httpMethod: 'get',
405
+ httpPath: '/api/v1/pipelines/{pipeline_id}/files/status-counts',
406
+ },
407
+ {
408
+ clientCallName: 'client.pipelines.metadata.create',
409
+ fullyQualifiedName: 'pipelines.metadata.create',
410
+ httpMethod: 'put',
411
+ httpPath: '/api/v1/pipelines/{pipeline_id}/metadata',
412
+ },
413
+ {
414
+ clientCallName: 'client.pipelines.metadata.deleteAll',
415
+ fullyQualifiedName: 'pipelines.metadata.deleteAll',
416
+ httpMethod: 'delete',
417
+ httpPath: '/api/v1/pipelines/{pipeline_id}/metadata',
418
+ },
419
+ {
420
+ clientCallName: 'client.pipelines.documents.create',
421
+ fullyQualifiedName: 'pipelines.documents.create',
422
+ httpMethod: 'post',
423
+ httpPath: '/api/v1/pipelines/{pipeline_id}/documents',
424
+ },
425
+ {
426
+ clientCallName: 'client.pipelines.documents.list',
427
+ fullyQualifiedName: 'pipelines.documents.list',
428
+ httpMethod: 'get',
429
+ httpPath: '/api/v1/pipelines/{pipeline_id}/documents/paginated',
430
+ },
431
+ {
432
+ clientCallName: 'client.pipelines.documents.delete',
433
+ fullyQualifiedName: 'pipelines.documents.delete',
434
+ httpMethod: 'delete',
435
+ httpPath: '/api/v1/pipelines/{pipeline_id}/documents/{document_id}',
436
+ },
437
+ {
438
+ clientCallName: 'client.pipelines.documents.get',
439
+ fullyQualifiedName: 'pipelines.documents.get',
440
+ httpMethod: 'get',
441
+ httpPath: '/api/v1/pipelines/{pipeline_id}/documents/{document_id}',
442
+ },
443
+ {
444
+ clientCallName: 'client.pipelines.documents.getChunks',
445
+ fullyQualifiedName: 'pipelines.documents.getChunks',
446
+ httpMethod: 'get',
447
+ httpPath: '/api/v1/pipelines/{pipeline_id}/documents/{document_id}/chunks',
448
+ },
449
+ {
450
+ clientCallName: 'client.pipelines.documents.getStatus',
451
+ fullyQualifiedName: 'pipelines.documents.getStatus',
452
+ httpMethod: 'get',
453
+ httpPath: '/api/v1/pipelines/{pipeline_id}/documents/{document_id}/status',
454
+ },
455
+ {
456
+ clientCallName: 'client.pipelines.documents.sync',
457
+ fullyQualifiedName: 'pipelines.documents.sync',
458
+ httpMethod: 'post',
459
+ httpPath: '/api/v1/pipelines/{pipeline_id}/documents/{document_id}/sync',
460
+ },
461
+ {
462
+ clientCallName: 'client.pipelines.documents.upsert',
463
+ fullyQualifiedName: 'pipelines.documents.upsert',
464
+ httpMethod: 'put',
465
+ httpPath: '/api/v1/pipelines/{pipeline_id}/documents',
466
+ },
467
+ {
468
+ clientCallName: 'client.retrievers.create',
469
+ fullyQualifiedName: 'retrievers.create',
470
+ httpMethod: 'post',
471
+ httpPath: '/api/v1/retrievers',
472
+ },
473
+ {
474
+ clientCallName: 'client.retrievers.update',
475
+ fullyQualifiedName: 'retrievers.update',
476
+ httpMethod: 'put',
477
+ httpPath: '/api/v1/retrievers/{retriever_id}',
478
+ },
479
+ {
480
+ clientCallName: 'client.retrievers.list',
481
+ fullyQualifiedName: 'retrievers.list',
482
+ httpMethod: 'get',
483
+ httpPath: '/api/v1/retrievers',
484
+ },
485
+ {
486
+ clientCallName: 'client.retrievers.delete',
487
+ fullyQualifiedName: 'retrievers.delete',
488
+ httpMethod: 'delete',
489
+ httpPath: '/api/v1/retrievers/{retriever_id}',
490
+ },
491
+ {
492
+ clientCallName: 'client.retrievers.get',
493
+ fullyQualifiedName: 'retrievers.get',
494
+ httpMethod: 'get',
495
+ httpPath: '/api/v1/retrievers/{retriever_id}',
496
+ },
497
+ {
498
+ clientCallName: 'client.retrievers.search',
499
+ fullyQualifiedName: 'retrievers.search',
500
+ httpMethod: 'post',
501
+ httpPath: '/api/v1/retrievers/retrieve',
502
+ },
503
+ {
504
+ clientCallName: 'client.retrievers.upsert',
505
+ fullyQualifiedName: 'retrievers.upsert',
506
+ httpMethod: 'put',
507
+ httpPath: '/api/v1/retrievers',
508
+ },
509
+ {
510
+ clientCallName: 'client.retrievers.retriever.search',
511
+ fullyQualifiedName: 'retrievers.retriever.search',
512
+ httpMethod: 'post',
513
+ httpPath: '/api/v1/retrievers/{retriever_id}/retrieve',
514
+ },
515
+ {
516
+ clientCallName: 'client.beta.agentData.update',
517
+ fullyQualifiedName: 'beta.agentData.update',
518
+ httpMethod: 'put',
519
+ httpPath: '/api/v1/beta/agent-data/{item_id}',
520
+ },
521
+ {
522
+ clientCallName: 'client.beta.agentData.delete',
523
+ fullyQualifiedName: 'beta.agentData.delete',
524
+ httpMethod: 'delete',
525
+ httpPath: '/api/v1/beta/agent-data/{item_id}',
526
+ },
527
+ {
528
+ clientCallName: 'client.beta.agentData.agentData',
529
+ fullyQualifiedName: 'beta.agentData.agentData',
530
+ httpMethod: 'post',
531
+ httpPath: '/api/v1/beta/agent-data',
532
+ },
533
+ {
534
+ clientCallName: 'client.beta.agentData.aggregate',
535
+ fullyQualifiedName: 'beta.agentData.aggregate',
536
+ httpMethod: 'post',
537
+ httpPath: '/api/v1/beta/agent-data/:aggregate',
538
+ },
539
+ {
540
+ clientCallName: 'client.beta.agentData.deleteByQuery',
541
+ fullyQualifiedName: 'beta.agentData.deleteByQuery',
542
+ httpMethod: 'post',
543
+ httpPath: '/api/v1/beta/agent-data/:delete',
544
+ },
545
+ {
546
+ clientCallName: 'client.beta.agentData.get',
547
+ fullyQualifiedName: 'beta.agentData.get',
548
+ httpMethod: 'get',
549
+ httpPath: '/api/v1/beta/agent-data/{item_id}',
550
+ },
551
+ {
552
+ clientCallName: 'client.beta.agentData.search',
553
+ fullyQualifiedName: 'beta.agentData.search',
554
+ httpMethod: 'post',
555
+ httpPath: '/api/v1/beta/agent-data/:search',
556
+ },
557
+ {
558
+ clientCallName: 'client.beta.parseConfigurations.create',
559
+ fullyQualifiedName: 'beta.parseConfigurations.create',
560
+ httpMethod: 'post',
561
+ httpPath: '/api/v1/beta/parse-configurations',
562
+ },
563
+ {
564
+ clientCallName: 'client.beta.parseConfigurations.update',
565
+ fullyQualifiedName: 'beta.parseConfigurations.update',
566
+ httpMethod: 'put',
567
+ httpPath: '/api/v1/beta/parse-configurations/{config_id}',
568
+ },
569
+ {
570
+ clientCallName: 'client.beta.parseConfigurations.list',
571
+ fullyQualifiedName: 'beta.parseConfigurations.list',
572
+ httpMethod: 'get',
573
+ httpPath: '/api/v1/beta/parse-configurations',
574
+ },
575
+ {
576
+ clientCallName: 'client.beta.parseConfigurations.delete',
577
+ fullyQualifiedName: 'beta.parseConfigurations.delete',
578
+ httpMethod: 'delete',
579
+ httpPath: '/api/v1/beta/parse-configurations/{config_id}',
580
+ },
581
+ {
582
+ clientCallName: 'client.beta.parseConfigurations.get',
583
+ fullyQualifiedName: 'beta.parseConfigurations.get',
584
+ httpMethod: 'get',
585
+ httpPath: '/api/v1/beta/parse-configurations/{config_id}',
586
+ },
587
+ {
588
+ clientCallName: 'client.beta.sheets.create',
589
+ fullyQualifiedName: 'beta.sheets.create',
590
+ httpMethod: 'post',
591
+ httpPath: '/api/v1/beta/sheets/jobs',
592
+ },
593
+ {
594
+ clientCallName: 'client.beta.sheets.list',
595
+ fullyQualifiedName: 'beta.sheets.list',
596
+ httpMethod: 'get',
597
+ httpPath: '/api/v1/beta/sheets/jobs',
598
+ },
599
+ {
600
+ clientCallName: 'client.beta.sheets.deleteJob',
601
+ fullyQualifiedName: 'beta.sheets.deleteJob',
602
+ httpMethod: 'delete',
603
+ httpPath: '/api/v1/beta/sheets/jobs/{spreadsheet_job_id}',
604
+ },
605
+ {
606
+ clientCallName: 'client.beta.sheets.get',
607
+ fullyQualifiedName: 'beta.sheets.get',
608
+ httpMethod: 'get',
609
+ httpPath: '/api/v1/beta/sheets/jobs/{spreadsheet_job_id}',
610
+ },
611
+ {
612
+ clientCallName: 'client.beta.sheets.getResultTable',
613
+ fullyQualifiedName: 'beta.sheets.getResultTable',
614
+ httpMethod: 'get',
615
+ httpPath: '/api/v1/beta/sheets/jobs/{spreadsheet_job_id}/regions/{region_id}/result/{region_type}',
616
+ },
617
+ {
618
+ clientCallName: 'client.beta.directories.create',
619
+ fullyQualifiedName: 'beta.directories.create',
620
+ httpMethod: 'post',
621
+ httpPath: '/api/v1/beta/directories',
622
+ },
623
+ {
624
+ clientCallName: 'client.beta.directories.update',
625
+ fullyQualifiedName: 'beta.directories.update',
626
+ httpMethod: 'patch',
627
+ httpPath: '/api/v1/beta/directories/{directory_id}',
628
+ },
629
+ {
630
+ clientCallName: 'client.beta.directories.list',
631
+ fullyQualifiedName: 'beta.directories.list',
632
+ httpMethod: 'get',
633
+ httpPath: '/api/v1/beta/directories',
634
+ },
635
+ {
636
+ clientCallName: 'client.beta.directories.delete',
637
+ fullyQualifiedName: 'beta.directories.delete',
638
+ httpMethod: 'delete',
639
+ httpPath: '/api/v1/beta/directories/{directory_id}',
640
+ },
641
+ {
642
+ clientCallName: 'client.beta.directories.get',
643
+ fullyQualifiedName: 'beta.directories.get',
644
+ httpMethod: 'get',
645
+ httpPath: '/api/v1/beta/directories/{directory_id}',
646
+ },
647
+ {
648
+ clientCallName: 'client.beta.directories.files.update',
649
+ fullyQualifiedName: 'beta.directories.files.update',
650
+ httpMethod: 'patch',
651
+ httpPath: '/api/v1/beta/directories/{directory_id}/files/{directory_file_id}',
652
+ },
653
+ {
654
+ clientCallName: 'client.beta.directories.files.list',
655
+ fullyQualifiedName: 'beta.directories.files.list',
656
+ httpMethod: 'get',
657
+ httpPath: '/api/v1/beta/directories/{directory_id}/files',
658
+ },
659
+ {
660
+ clientCallName: 'client.beta.directories.files.delete',
661
+ fullyQualifiedName: 'beta.directories.files.delete',
662
+ httpMethod: 'delete',
663
+ httpPath: '/api/v1/beta/directories/{directory_id}/files/{directory_file_id}',
664
+ },
665
+ {
666
+ clientCallName: 'client.beta.directories.files.add',
667
+ fullyQualifiedName: 'beta.directories.files.add',
668
+ httpMethod: 'post',
669
+ httpPath: '/api/v1/beta/directories/{directory_id}/files',
670
+ },
671
+ {
672
+ clientCallName: 'client.beta.directories.files.get',
673
+ fullyQualifiedName: 'beta.directories.files.get',
674
+ httpMethod: 'get',
675
+ httpPath: '/api/v1/beta/directories/{directory_id}/files/{directory_file_id}',
676
+ },
677
+ {
678
+ clientCallName: 'client.beta.directories.files.upload',
679
+ fullyQualifiedName: 'beta.directories.files.upload',
680
+ httpMethod: 'post',
681
+ httpPath: '/api/v1/beta/directories/{directory_id}/files/upload',
682
+ },
683
+ {
684
+ clientCallName: 'client.beta.batch.create',
685
+ fullyQualifiedName: 'beta.batch.create',
686
+ httpMethod: 'post',
687
+ httpPath: '/api/v1/beta/batch-processing',
688
+ },
689
+ {
690
+ clientCallName: 'client.beta.batch.list',
691
+ fullyQualifiedName: 'beta.batch.list',
692
+ httpMethod: 'get',
693
+ httpPath: '/api/v1/beta/batch-processing',
694
+ },
695
+ {
696
+ clientCallName: 'client.beta.batch.cancel',
697
+ fullyQualifiedName: 'beta.batch.cancel',
698
+ httpMethod: 'post',
699
+ httpPath: '/api/v1/beta/batch-processing/{job_id}/cancel',
700
+ },
701
+ {
702
+ clientCallName: 'client.beta.batch.getStatus',
703
+ fullyQualifiedName: 'beta.batch.getStatus',
704
+ httpMethod: 'get',
705
+ httpPath: '/api/v1/beta/batch-processing/{job_id}',
706
+ },
707
+ {
708
+ clientCallName: 'client.beta.batch.jobItems.list',
709
+ fullyQualifiedName: 'beta.batch.jobItems.list',
710
+ httpMethod: 'get',
711
+ httpPath: '/api/v1/beta/batch-processing/{job_id}/items',
712
+ },
713
+ {
714
+ clientCallName: 'client.beta.batch.jobItems.getProcessingResults',
715
+ fullyQualifiedName: 'beta.batch.jobItems.getProcessingResults',
716
+ httpMethod: 'get',
717
+ httpPath: '/api/v1/beta/batch-processing/items/{item_id}/processing-results',
718
+ },
719
+ {
720
+ clientCallName: 'client.beta.split.create',
721
+ fullyQualifiedName: 'beta.split.create',
722
+ httpMethod: 'post',
723
+ httpPath: '/api/v1/beta/split/jobs',
724
+ },
725
+ {
726
+ clientCallName: 'client.beta.split.list',
727
+ fullyQualifiedName: 'beta.split.list',
728
+ httpMethod: 'get',
729
+ httpPath: '/api/v1/beta/split/jobs',
730
+ },
731
+ {
732
+ clientCallName: 'client.beta.split.get',
733
+ fullyQualifiedName: 'beta.split.get',
734
+ httpMethod: 'get',
735
+ httpPath: '/api/v1/beta/split/jobs/{split_job_id}',
736
+ },
737
+ ];
738
+
739
+ function allowedMethodsForCodeTool(options: McpOptions | undefined): SdkMethod[] | undefined {
740
+ if (!options) {
741
+ return undefined;
742
+ }
743
+
744
+ let allowedMethods: SdkMethod[];
745
+
746
+ if (options.codeAllowHttpGets || options.codeAllowedMethods) {
747
+ // Start with nothing allowed and then add into it from options
748
+ let allowedMethodsSet = new Set<SdkMethod>();
749
+
750
+ if (options.codeAllowHttpGets) {
751
+ // Add all methods that map to an HTTP GET
752
+ sdkMethods
753
+ .filter((method) => method.httpMethod === 'get')
754
+ .forEach((method) => allowedMethodsSet.add(method));
755
+ }
756
+
757
+ if (options.codeAllowedMethods) {
758
+ // Add all methods that match any of the allowed regexps
759
+ const allowedRegexps = options.codeAllowedMethods.map((pattern) => {
760
+ try {
761
+ return new RegExp(pattern);
762
+ } catch (e) {
763
+ throw new Error(
764
+ `Invalid regex pattern for allowed method: "${pattern}": ${e instanceof Error ? e.message : e}`,
765
+ );
766
+ }
767
+ });
768
+
769
+ sdkMethods
770
+ .filter((method) => allowedRegexps.some((regexp) => regexp.test(method.fullyQualifiedName)))
771
+ .forEach((method) => allowedMethodsSet.add(method));
772
+ }
773
+
774
+ allowedMethods = Array.from(allowedMethodsSet);
775
+ } else {
776
+ // Start with everything allowed
777
+ allowedMethods = [...sdkMethods];
778
+ }
779
+
780
+ if (options.codeBlockedMethods) {
781
+ // Filter down based on blocked regexps
782
+ const blockedRegexps = options.codeBlockedMethods.map((pattern) => {
783
+ try {
784
+ return new RegExp(pattern);
785
+ } catch (e) {
786
+ throw new Error(
787
+ `Invalid regex pattern for blocked method: "${pattern}": ${e instanceof Error ? e.message : e}`,
788
+ );
789
+ }
790
+ });
791
+
792
+ allowedMethods = allowedMethods.filter(
793
+ (method) => !blockedRegexps.some((regexp) => regexp.test(method.fullyQualifiedName)),
794
+ );
795
+ }
796
+
797
+ return allowedMethods;
798
+ }
799
+
800
+ export function blockedMethodsForCodeTool(options: McpOptions | undefined): SdkMethod[] | undefined {
801
+ const allowedMethods = allowedMethodsForCodeTool(options);
802
+ if (!allowedMethods) {
803
+ return undefined;
804
+ }
805
+
806
+ const allowedSet = new Set(allowedMethods.map((method) => method.fullyQualifiedName));
807
+
808
+ // Return any methods that are not explicitly allowed
809
+ return sdkMethods.filter((method) => !allowedSet.has(method.fullyQualifiedName));
810
+ }