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