langflow-mcp-server 3.1.1 → 4.11.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 +228 -79
- package/dist/__tests__/fixtures/vertices.d.ts +1 -2
- package/dist/__tests__/fixtures/vertices.d.ts.map +1 -1
- package/dist/__tests__/fixtures/vertices.js +1 -5
- package/dist/__tests__/fixtures/vertices.js.map +1 -1
- package/dist/mcp/server-consolidated.d.ts +13 -0
- package/dist/mcp/server-consolidated.d.ts.map +1 -1
- package/dist/mcp/server-consolidated.js +684 -17
- package/dist/mcp/server-consolidated.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +717 -20
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools-consolidated.d.ts.map +1 -1
- package/dist/mcp/tools-consolidated.js +722 -43
- package/dist/mcp/tools-consolidated.js.map +1 -1
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +1701 -66
- package/dist/mcp/tools.js.map +1 -1
- package/dist/mcp/validation-consolidated.d.ts +681 -9
- package/dist/mcp/validation-consolidated.d.ts.map +1 -1
- package/dist/mcp/validation-consolidated.js +635 -15
- package/dist/mcp/validation-consolidated.js.map +1 -1
- package/dist/mcp/validation.d.ts +769 -11
- package/dist/mcp/validation.d.ts.map +1 -1
- package/dist/mcp/validation.js +600 -11
- package/dist/mcp/validation.js.map +1 -1
- package/dist/services/langflow-client.d.ts +133 -51
- package/dist/services/langflow-client.d.ts.map +1 -1
- package/dist/services/langflow-client.js +1102 -154
- package/dist/services/langflow-client.js.map +1 -1
- package/dist/types/index.d.ts +395 -4
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +16 -13
package/dist/mcp/server.js
CHANGED
|
@@ -89,7 +89,8 @@ class LangflowMCPServer {
|
|
|
89
89
|
'access_token', 'refresh_token', 'authorization',
|
|
90
90
|
'x-api-key', 'x-store-api-key', 'set-cookie',
|
|
91
91
|
'bearer', 'session', 'session_id', 'cookie',
|
|
92
|
-
'private_key', 'secret', 'credentials', 'api-key'
|
|
92
|
+
'private_key', 'secret', 'credentials', 'api-key',
|
|
93
|
+
'file_content', 'file', 'content', 'payload', 'data'
|
|
93
94
|
]);
|
|
94
95
|
if (depth > MAX_DEPTH) {
|
|
95
96
|
return { __error: 'max depth exceeded' };
|
|
@@ -165,6 +166,10 @@ class LangflowMCPServer {
|
|
|
165
166
|
if (!base64Regex.test(fileContent)) {
|
|
166
167
|
throw new Error('Invalid base64 format');
|
|
167
168
|
}
|
|
169
|
+
if (fileContent.length % 4 !== 0 ||
|
|
170
|
+
Buffer.from(fileContent, 'base64').toString('base64') !== fileContent) {
|
|
171
|
+
throw new Error('Invalid base64 format');
|
|
172
|
+
}
|
|
168
173
|
const estimatedSize = (fileContent.length * 3) / 4;
|
|
169
174
|
if (estimatedSize > maxSizeBytes) {
|
|
170
175
|
throw new Error(`File size ${Math.round(estimatedSize)} bytes (estimated) exceeds maximum allowed size of ${maxSizeBytes} bytes (10MB)`);
|
|
@@ -280,7 +285,8 @@ class LangflowMCPServer {
|
|
|
280
285
|
}
|
|
281
286
|
case 'run_flow': {
|
|
282
287
|
const validated = validation_1.RunFlowSchema.parse(args);
|
|
283
|
-
const
|
|
288
|
+
const { context: nestedContext, ...inputRequest } = validated.input_request;
|
|
289
|
+
const result = await this.client.runFlow(validated.flow_id_or_name, inputRequest, validated.stream, validated.context ?? nestedContext);
|
|
284
290
|
return this.formatSuccessResponse(result);
|
|
285
291
|
}
|
|
286
292
|
case 'trigger_webhook': {
|
|
@@ -450,7 +456,7 @@ class LangflowMCPServer {
|
|
|
450
456
|
flow_id: validated.flow_id,
|
|
451
457
|
file_name: validated.file_name
|
|
452
458
|
});
|
|
453
|
-
if (!fileData) {
|
|
459
|
+
if (!fileData || (fileData.byteLength ?? fileData.length) === 0) {
|
|
454
460
|
throw new Error('No file data received from server');
|
|
455
461
|
}
|
|
456
462
|
const base64Data = Buffer.from(fileData).toString('base64');
|
|
@@ -478,7 +484,7 @@ class LangflowMCPServer {
|
|
|
478
484
|
flow_id: validated.flow_id,
|
|
479
485
|
file_name: validated.file_name
|
|
480
486
|
});
|
|
481
|
-
if (!imageData) {
|
|
487
|
+
if (!imageData || (imageData.byteLength ?? imageData.length) === 0) {
|
|
482
488
|
throw new Error('No image data received from server');
|
|
483
489
|
}
|
|
484
490
|
const base64Data = Buffer.from(imageData).toString('base64');
|
|
@@ -495,7 +501,7 @@ class LangflowMCPServer {
|
|
|
495
501
|
case 'get_profile_picture': {
|
|
496
502
|
const validated = validation_1.GetProfilePictureSchema.parse(args);
|
|
497
503
|
const pictureData = await this.client.getProfilePicture(validated.folder_name, validated.file_name);
|
|
498
|
-
if (!pictureData) {
|
|
504
|
+
if (!pictureData || (pictureData.byteLength ?? pictureData.length) === 0) {
|
|
499
505
|
throw new Error('No picture data received from server');
|
|
500
506
|
}
|
|
501
507
|
const base64Data = Buffer.from(pictureData).toString('base64');
|
|
@@ -635,11 +641,6 @@ class LangflowMCPServer {
|
|
|
635
641
|
const result = await this.client.buildVertices(flow_id, request);
|
|
636
642
|
return this.formatSuccessResponse(result);
|
|
637
643
|
}
|
|
638
|
-
case 'get_vertex': {
|
|
639
|
-
const validated = validation_1.GetVertexSchema.parse(args);
|
|
640
|
-
const result = await this.client.getVertex(validated);
|
|
641
|
-
return this.formatSuccessResponse(result);
|
|
642
|
-
}
|
|
643
644
|
case 'stream_vertex_build': {
|
|
644
645
|
const validated = validation_1.StreamVertexBuildSchema.parse(args);
|
|
645
646
|
const result = await this.client.streamVertexBuild(validated);
|
|
@@ -660,11 +661,6 @@ class LangflowMCPServer {
|
|
|
660
661
|
const result = await this.client.getCurrentUser();
|
|
661
662
|
return this.formatSuccessResponse(result);
|
|
662
663
|
}
|
|
663
|
-
case 'get_user': {
|
|
664
|
-
const validated = validation_1.GetUserSchema.parse(args);
|
|
665
|
-
const result = await this.client.getUser(validated.user_id);
|
|
666
|
-
return this.formatSuccessResponse(result);
|
|
667
|
-
}
|
|
668
664
|
case 'update_user': {
|
|
669
665
|
const validated = validation_1.UpdateUserSchema.parse(args);
|
|
670
666
|
const { user_id, ...updates } = validated;
|
|
@@ -694,11 +690,6 @@ class LangflowMCPServer {
|
|
|
694
690
|
await this.client.deleteApiKey(validated.api_key_id);
|
|
695
691
|
return this.formatSuccessResponse({ success: true, message: 'API key deleted successfully' });
|
|
696
692
|
}
|
|
697
|
-
case 'list_custom_components': {
|
|
698
|
-
validation_1.ListCustomComponentsSchema.parse(args);
|
|
699
|
-
const result = await this.client.listCustomComponents();
|
|
700
|
-
return this.formatSuccessResponse(result);
|
|
701
|
-
}
|
|
702
693
|
case 'create_custom_component': {
|
|
703
694
|
const validated = validation_1.CreateCustomComponentSchema.parse(args);
|
|
704
695
|
const result = await this.client.createCustomComponent(validated);
|
|
@@ -779,6 +770,712 @@ class LangflowMCPServer {
|
|
|
779
770
|
const result = await this.client.getLogs(validated.stream);
|
|
780
771
|
return this.formatSuccessResponse(result);
|
|
781
772
|
}
|
|
773
|
+
case 'replace_flow': {
|
|
774
|
+
const validated = validation_1.ReplaceFlowSchema.parse(args);
|
|
775
|
+
const { flow_id, ...body } = validated;
|
|
776
|
+
const result = await this.client.replaceFlow(flow_id, body);
|
|
777
|
+
return this.formatSuccessResponse(result);
|
|
778
|
+
}
|
|
779
|
+
case 'expand_flows': {
|
|
780
|
+
const validated = validation_1.ExpandFlowsSchema.parse(args);
|
|
781
|
+
const result = await this.client.expandFlows(validated.body);
|
|
782
|
+
return this.formatSuccessResponse(result);
|
|
783
|
+
}
|
|
784
|
+
case 'get_flow_events': {
|
|
785
|
+
const validated = validation_1.GetFlowEventsSchema.parse(args);
|
|
786
|
+
const result = await this.client.getFlowEvents(validated.flow_id, validated.since !== undefined ? { since: validated.since } : undefined);
|
|
787
|
+
return this.formatSuccessResponse(result);
|
|
788
|
+
}
|
|
789
|
+
case 'create_flow_event': {
|
|
790
|
+
const validated = validation_1.CreateFlowEventSchema.parse(args);
|
|
791
|
+
const { flow_id, ...body } = validated;
|
|
792
|
+
const result = await this.client.createFlowEvent(flow_id, body);
|
|
793
|
+
return this.formatSuccessResponse(result);
|
|
794
|
+
}
|
|
795
|
+
case 'list_flow_versions': {
|
|
796
|
+
const validated = validation_1.ListFlowVersionsSchema.parse(args);
|
|
797
|
+
const { flow_id, ...params } = validated;
|
|
798
|
+
const result = await this.client.listFlowVersions(flow_id, params);
|
|
799
|
+
return this.formatSuccessResponse(result);
|
|
800
|
+
}
|
|
801
|
+
case 'create_flow_version': {
|
|
802
|
+
const validated = validation_1.CreateFlowVersionSchema.parse(args);
|
|
803
|
+
const result = await this.client.createFlowVersion(validated.flow_id, validated.body);
|
|
804
|
+
return this.formatSuccessResponse(result);
|
|
805
|
+
}
|
|
806
|
+
case 'get_flow_version': {
|
|
807
|
+
const validated = validation_1.GetFlowVersionSchema.parse(args);
|
|
808
|
+
const result = await this.client.getFlowVersion(validated.flow_id, validated.version_id);
|
|
809
|
+
return this.formatSuccessResponse(result);
|
|
810
|
+
}
|
|
811
|
+
case 'delete_flow_version': {
|
|
812
|
+
const validated = validation_1.DeleteFlowVersionSchema.parse(args);
|
|
813
|
+
await this.client.deleteFlowVersion(validated.flow_id, validated.version_id);
|
|
814
|
+
return this.formatSuccessResponse({
|
|
815
|
+
success: true,
|
|
816
|
+
message: 'Flow version deleted successfully'
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
case 'activate_flow_version': {
|
|
820
|
+
const validated = validation_1.ActivateFlowVersionSchema.parse(args);
|
|
821
|
+
const result = await this.client.activateFlowVersion(validated.flow_id, validated.version_id, validated.save_draft !== undefined ? { save_draft: validated.save_draft } : undefined);
|
|
822
|
+
return this.formatSuccessResponse(result);
|
|
823
|
+
}
|
|
824
|
+
case 'detect_variables': {
|
|
825
|
+
const validated = validation_1.DetectVariablesSchema.parse(args);
|
|
826
|
+
const result = await this.client.detectVariables({ flow_version_ids: validated.flow_version_ids });
|
|
827
|
+
return this.formatSuccessResponse(result);
|
|
828
|
+
}
|
|
829
|
+
case 'save_store_api_key': {
|
|
830
|
+
const validated = validation_1.SaveStoreApiKeySchema.parse(args);
|
|
831
|
+
const result = await this.client.saveStoreApiKey(validated.api_key);
|
|
832
|
+
return this.formatSuccessResponse(result);
|
|
833
|
+
}
|
|
834
|
+
case 'update_custom_component': {
|
|
835
|
+
const validated = validation_1.UpdateCustomComponentSchema.parse(args);
|
|
836
|
+
const result = await this.client.updateCustomComponentCode(validated);
|
|
837
|
+
return this.formatSuccessResponse(result);
|
|
838
|
+
}
|
|
839
|
+
case 'create_store_component': {
|
|
840
|
+
const validated = validation_1.CreateStoreComponentSchema.parse(args);
|
|
841
|
+
const result = await this.client.createStoreComponent({
|
|
842
|
+
description: null,
|
|
843
|
+
tags: null,
|
|
844
|
+
is_component: null,
|
|
845
|
+
...validated
|
|
846
|
+
});
|
|
847
|
+
return this.formatSuccessResponse(result);
|
|
848
|
+
}
|
|
849
|
+
case 'like_store_component': {
|
|
850
|
+
const validated = validation_1.LikeStoreComponentSchema.parse(args);
|
|
851
|
+
const result = await this.client.likeStoreComponent(validated.component_id);
|
|
852
|
+
return this.formatSuccessResponse(result);
|
|
853
|
+
}
|
|
854
|
+
case 'create_response': {
|
|
855
|
+
const validated = validation_1.CreateResponseSchema.parse(args);
|
|
856
|
+
const result = await this.client.createResponse(validated);
|
|
857
|
+
return this.formatSuccessResponse(result);
|
|
858
|
+
}
|
|
859
|
+
case 'get_session': {
|
|
860
|
+
validation_1.GetSessionSchema.parse(args);
|
|
861
|
+
const result = await this.client.getSession();
|
|
862
|
+
return this.formatSuccessResponse(result);
|
|
863
|
+
}
|
|
864
|
+
case 'create_user': {
|
|
865
|
+
const validated = validation_1.CreateUserSchema.parse(args);
|
|
866
|
+
const result = await this.client.createUser(validated);
|
|
867
|
+
return this.formatSuccessResponse(result);
|
|
868
|
+
}
|
|
869
|
+
case 'get_webhook_events': {
|
|
870
|
+
const validated = validation_1.GetWebhookEventsSchema.parse(args);
|
|
871
|
+
const result = await this.client.getWebhookEvents(validated.flow_id_or_name, validated.user_id ? { user_id: validated.user_id } : undefined);
|
|
872
|
+
return this.formatSuccessResponse(result);
|
|
873
|
+
}
|
|
874
|
+
case 'get_health_check': {
|
|
875
|
+
validation_1.GetHealthCheckSchema.parse(args);
|
|
876
|
+
const result = await this.client.getHealthCheck();
|
|
877
|
+
return this.formatSuccessResponse(result);
|
|
878
|
+
}
|
|
879
|
+
case 'list_files_v2': {
|
|
880
|
+
validation_1.ListFilesV2Schema.parse(args);
|
|
881
|
+
const result = await this.client.listFilesV2();
|
|
882
|
+
return this.formatSuccessResponse(result);
|
|
883
|
+
}
|
|
884
|
+
case 'upload_file_v2': {
|
|
885
|
+
const validated = validation_1.UploadFileV2Schema.parse(args);
|
|
886
|
+
const fileBuffer = this.validateFileSize(validated.file_content);
|
|
887
|
+
const params = {};
|
|
888
|
+
if (validated.append !== undefined)
|
|
889
|
+
params.append = validated.append;
|
|
890
|
+
if (validated.ephemeral !== undefined)
|
|
891
|
+
params.ephemeral = validated.ephemeral;
|
|
892
|
+
const result = await this.client.uploadFileV2(fileBuffer, validated.file_name, params);
|
|
893
|
+
return this.formatSuccessResponse(result);
|
|
894
|
+
}
|
|
895
|
+
case 'get_file_v2': {
|
|
896
|
+
const validated = validation_1.GetFileV2Schema.parse(args);
|
|
897
|
+
const result = await this.client.getFileV2(validated.file_id, validated.return_content !== undefined ? { return_content: validated.return_content } : undefined);
|
|
898
|
+
return this.formatSuccessResponse(result);
|
|
899
|
+
}
|
|
900
|
+
case 'rename_file_v2': {
|
|
901
|
+
const validated = validation_1.RenameFileV2Schema.parse(args);
|
|
902
|
+
const result = await this.client.renameFileV2(validated.file_id, validated.name);
|
|
903
|
+
return this.formatSuccessResponse(result);
|
|
904
|
+
}
|
|
905
|
+
case 'delete_file_v2': {
|
|
906
|
+
const validated = validation_1.DeleteFileV2Schema.parse(args);
|
|
907
|
+
const result = await this.client.deleteFileV2(validated.file_id);
|
|
908
|
+
return this.formatSuccessResponse(result);
|
|
909
|
+
}
|
|
910
|
+
case 'delete_all_files_v2': {
|
|
911
|
+
validation_1.DeleteAllFilesV2Schema.parse(args);
|
|
912
|
+
const result = await this.client.deleteAllFilesV2();
|
|
913
|
+
return this.formatSuccessResponse(result);
|
|
914
|
+
}
|
|
915
|
+
case 'batch_download_files_v2': {
|
|
916
|
+
const validated = validation_1.BatchDownloadFilesV2Schema.parse(args);
|
|
917
|
+
const result = await this.client.batchDownloadFilesV2(validated.file_ids);
|
|
918
|
+
return this.formatSuccessResponse(result);
|
|
919
|
+
}
|
|
920
|
+
case 'batch_delete_files_v2': {
|
|
921
|
+
const validated = validation_1.BatchDeleteFilesV2Schema.parse(args);
|
|
922
|
+
const result = await this.client.batchDeleteFilesV2(validated.file_ids);
|
|
923
|
+
return this.formatSuccessResponse(result);
|
|
924
|
+
}
|
|
925
|
+
case 'list_knowledge_bases_detailed': {
|
|
926
|
+
validation_1.ListKnowledgeBasesDetailedSchema.parse(args);
|
|
927
|
+
const result = await this.client.listKnowledgeBasesDetailed();
|
|
928
|
+
return this.formatSuccessResponse(result);
|
|
929
|
+
}
|
|
930
|
+
case 'create_knowledge_base': {
|
|
931
|
+
const validated = validation_1.CreateKnowledgeBaseSchema.parse(args);
|
|
932
|
+
const result = await this.client.createKnowledgeBase(validated);
|
|
933
|
+
return this.formatSuccessResponse(result);
|
|
934
|
+
}
|
|
935
|
+
case 'preview_knowledge_base_chunks': {
|
|
936
|
+
const validated = validation_1.PreviewKnowledgeBaseChunksSchema.parse(args);
|
|
937
|
+
const fileBuffer = this.validateFileSize(validated.file_content);
|
|
938
|
+
const result = await this.client.previewKnowledgeBaseChunks([{ buffer: fileBuffer, filename: validated.file_name }], validated.params);
|
|
939
|
+
return this.formatSuccessResponse(result);
|
|
940
|
+
}
|
|
941
|
+
case 'list_knowledge_base_chunks': {
|
|
942
|
+
const validated = validation_1.ListKnowledgeBaseChunksSchema.parse(args);
|
|
943
|
+
const { kb_name, ...params } = validated;
|
|
944
|
+
const result = await this.client.listKnowledgeBaseChunks(kb_name, params);
|
|
945
|
+
return this.formatSuccessResponse(result);
|
|
946
|
+
}
|
|
947
|
+
case 'ingest_knowledge_base': {
|
|
948
|
+
const validated = validation_1.IngestKnowledgeBaseSchema.parse(args);
|
|
949
|
+
const fileBuffer = this.validateFileSize(validated.file_content);
|
|
950
|
+
const result = await this.client.ingestKnowledgeBase(validated.kb_name, [{ buffer: fileBuffer, filename: validated.file_name }], validated.params);
|
|
951
|
+
return this.formatSuccessResponse(result);
|
|
952
|
+
}
|
|
953
|
+
case 'cancel_knowledge_base_ingest': {
|
|
954
|
+
const validated = validation_1.CancelKnowledgeBaseIngestSchema.parse(args);
|
|
955
|
+
const result = await this.client.cancelKnowledgeBaseIngest(validated.kb_name);
|
|
956
|
+
return this.formatSuccessResponse(result);
|
|
957
|
+
}
|
|
958
|
+
case 'update_monitor_message': {
|
|
959
|
+
const validated = validation_1.UpdateMonitorMessageSchema.parse(args);
|
|
960
|
+
const { message_id, ...body } = validated;
|
|
961
|
+
const result = await this.client.updateMonitorMessage(message_id, body);
|
|
962
|
+
return this.formatSuccessResponse(result);
|
|
963
|
+
}
|
|
964
|
+
case 'delete_monitor_session_messages': {
|
|
965
|
+
const validated = validation_1.DeleteMonitorSessionMessagesSchema.parse(args);
|
|
966
|
+
const result = await this.client.deleteMonitorSessionMessages(validated.session_id);
|
|
967
|
+
return this.formatSuccessResponse(result);
|
|
968
|
+
}
|
|
969
|
+
case 'delete_monitor_sessions': {
|
|
970
|
+
const validated = validation_1.DeleteMonitorSessionsSchema.parse(args);
|
|
971
|
+
const result = await this.client.deleteMonitorSessions(validated.session_ids);
|
|
972
|
+
return this.formatSuccessResponse(result);
|
|
973
|
+
}
|
|
974
|
+
case 'get_shared_messages': {
|
|
975
|
+
const validated = validation_1.GetSharedMessagesSchema.parse(args);
|
|
976
|
+
const result = await this.client.getSharedMessages(validated);
|
|
977
|
+
return this.formatSuccessResponse(result);
|
|
978
|
+
}
|
|
979
|
+
case 'get_shared_sessions': {
|
|
980
|
+
const validated = validation_1.GetSharedSessionsSchema.parse(args);
|
|
981
|
+
const result = await this.client.getSharedSessions(validated.source_flow_id);
|
|
982
|
+
return this.formatSuccessResponse(result);
|
|
983
|
+
}
|
|
984
|
+
case 'update_shared_message': {
|
|
985
|
+
const validated = validation_1.UpdateSharedMessageSchema.parse(args);
|
|
986
|
+
const { message_id, source_flow_id, ...body } = validated;
|
|
987
|
+
const result = await this.client.updateSharedMessage(message_id, source_flow_id, body);
|
|
988
|
+
return this.formatSuccessResponse(result);
|
|
989
|
+
}
|
|
990
|
+
case 'migrate_shared_session': {
|
|
991
|
+
const validated = validation_1.MigrateSharedSessionSchema.parse(args);
|
|
992
|
+
const result = await this.client.migrateSharedSession(validated.session_id, {
|
|
993
|
+
new_session_id: validated.new_session_id,
|
|
994
|
+
source_flow_id: validated.source_flow_id
|
|
995
|
+
});
|
|
996
|
+
return this.formatSuccessResponse(result);
|
|
997
|
+
}
|
|
998
|
+
case 'delete_shared_session': {
|
|
999
|
+
const validated = validation_1.DeleteSharedSessionSchema.parse(args);
|
|
1000
|
+
const result = await this.client.deleteSharedSession(validated.session_id, validated.source_flow_id);
|
|
1001
|
+
return this.formatSuccessResponse(result);
|
|
1002
|
+
}
|
|
1003
|
+
case 'list_traces': {
|
|
1004
|
+
const validated = validation_1.ListTracesSchema.parse(args);
|
|
1005
|
+
const result = await this.client.listTraces(validated);
|
|
1006
|
+
return this.formatSuccessResponse(result);
|
|
1007
|
+
}
|
|
1008
|
+
case 'delete_traces': {
|
|
1009
|
+
const validated = validation_1.DeleteTracesSchema.parse(args);
|
|
1010
|
+
const result = await this.client.deleteTraces(validated.flow_id);
|
|
1011
|
+
return this.formatSuccessResponse(result);
|
|
1012
|
+
}
|
|
1013
|
+
case 'get_trace': {
|
|
1014
|
+
const validated = validation_1.GetTraceSchema.parse(args);
|
|
1015
|
+
const result = await this.client.getTrace(validated.trace_id);
|
|
1016
|
+
return this.formatSuccessResponse(result);
|
|
1017
|
+
}
|
|
1018
|
+
case 'delete_trace': {
|
|
1019
|
+
const validated = validation_1.DeleteTraceSchema.parse(args);
|
|
1020
|
+
await this.client.deleteTrace(validated.trace_id);
|
|
1021
|
+
return this.formatSuccessResponse({
|
|
1022
|
+
success: true,
|
|
1023
|
+
message: 'Trace deleted successfully'
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
1026
|
+
case 'list_models': {
|
|
1027
|
+
const validated = validation_1.ListModelsSchema.parse(args);
|
|
1028
|
+
const result = await this.client.listModels(validated);
|
|
1029
|
+
return this.formatSuccessResponse(result);
|
|
1030
|
+
}
|
|
1031
|
+
case 'list_model_providers': {
|
|
1032
|
+
validation_1.ListModelProvidersSchema.parse(args);
|
|
1033
|
+
const result = await this.client.listModelProviders();
|
|
1034
|
+
return this.formatSuccessResponse(result);
|
|
1035
|
+
}
|
|
1036
|
+
case 'list_enabled_providers': {
|
|
1037
|
+
const validated = validation_1.ListEnabledProvidersSchema.parse(args);
|
|
1038
|
+
const result = await this.client.listEnabledProviders(validated.providers ? { providers: validated.providers } : undefined);
|
|
1039
|
+
return this.formatSuccessResponse(result);
|
|
1040
|
+
}
|
|
1041
|
+
case 'list_enabled_models': {
|
|
1042
|
+
const validated = validation_1.ListEnabledModelsSchema.parse(args);
|
|
1043
|
+
const result = await this.client.listEnabledModels(validated.model_names ? { model_names: validated.model_names } : undefined);
|
|
1044
|
+
return this.formatSuccessResponse(result);
|
|
1045
|
+
}
|
|
1046
|
+
case 'set_enabled_models': {
|
|
1047
|
+
const validated = validation_1.SetEnabledModelsSchema.parse(args);
|
|
1048
|
+
const result = await this.client.setEnabledModels(validated.models);
|
|
1049
|
+
return this.formatSuccessResponse(result);
|
|
1050
|
+
}
|
|
1051
|
+
case 'get_default_model': {
|
|
1052
|
+
const validated = validation_1.GetDefaultModelSchema.parse(args);
|
|
1053
|
+
const result = await this.client.getDefaultModel({ model_type: validated.model_type });
|
|
1054
|
+
return this.formatSuccessResponse(result);
|
|
1055
|
+
}
|
|
1056
|
+
case 'set_default_model': {
|
|
1057
|
+
const validated = validation_1.SetDefaultModelSchema.parse(args);
|
|
1058
|
+
const result = await this.client.setDefaultModel({
|
|
1059
|
+
provider: validated.provider,
|
|
1060
|
+
model_name: validated.model_name,
|
|
1061
|
+
model_type: validated.model_type
|
|
1062
|
+
});
|
|
1063
|
+
return this.formatSuccessResponse(result);
|
|
1064
|
+
}
|
|
1065
|
+
case 'delete_default_model': {
|
|
1066
|
+
const validated = validation_1.DeleteDefaultModelSchema.parse(args);
|
|
1067
|
+
const result = await this.client.deleteDefaultModel({ model_type: validated.model_type });
|
|
1068
|
+
return this.formatSuccessResponse(result);
|
|
1069
|
+
}
|
|
1070
|
+
case 'get_provider_variable_mapping': {
|
|
1071
|
+
validation_1.GetProviderVariableMappingSchema.parse(args);
|
|
1072
|
+
const result = await this.client.getProviderVariableMapping();
|
|
1073
|
+
return this.formatSuccessResponse(result);
|
|
1074
|
+
}
|
|
1075
|
+
case 'validate_model_provider': {
|
|
1076
|
+
const validated = validation_1.ValidateModelProviderSchema.parse(args);
|
|
1077
|
+
const result = await this.client.validateModelProvider({
|
|
1078
|
+
provider: validated.provider,
|
|
1079
|
+
variables: validated.variables
|
|
1080
|
+
});
|
|
1081
|
+
return this.formatSuccessResponse(result);
|
|
1082
|
+
}
|
|
1083
|
+
case 'get_language_model_options': {
|
|
1084
|
+
validation_1.GetLanguageModelOptionsSchema.parse(args);
|
|
1085
|
+
const result = await this.client.getLanguageModelOptions();
|
|
1086
|
+
return this.formatSuccessResponse(result);
|
|
1087
|
+
}
|
|
1088
|
+
case 'get_embedding_model_options': {
|
|
1089
|
+
validation_1.GetEmbeddingModelOptionsSchema.parse(args);
|
|
1090
|
+
const result = await this.client.getEmbeddingModelOptions();
|
|
1091
|
+
return this.formatSuccessResponse(result);
|
|
1092
|
+
}
|
|
1093
|
+
case 'agentic_assist': {
|
|
1094
|
+
const validated = validation_1.AgenticAssistSchema.parse(args);
|
|
1095
|
+
const result = await this.client.agenticAssist(validated);
|
|
1096
|
+
return this.formatSuccessResponse(result);
|
|
1097
|
+
}
|
|
1098
|
+
case 'agentic_check_config': {
|
|
1099
|
+
validation_1.AgenticCheckConfigSchema.parse(args);
|
|
1100
|
+
const result = await this.client.agenticCheckConfig();
|
|
1101
|
+
return this.formatSuccessResponse(result);
|
|
1102
|
+
}
|
|
1103
|
+
case 'agentic_execute': {
|
|
1104
|
+
const validated = validation_1.AgenticExecuteSchema.parse(args);
|
|
1105
|
+
const { flow_name, ...body } = validated;
|
|
1106
|
+
const result = await this.client.agenticExecute(flow_name, body);
|
|
1107
|
+
return this.formatSuccessResponse(result);
|
|
1108
|
+
}
|
|
1109
|
+
case 'get_workflow_result': {
|
|
1110
|
+
const validated = validation_1.GetWorkflowResultSchema.parse(args);
|
|
1111
|
+
const result = await this.client.getWorkflowResult(validated.job_id ? { job_id: validated.job_id } : undefined);
|
|
1112
|
+
return this.formatSuccessResponse(result);
|
|
1113
|
+
}
|
|
1114
|
+
case 'run_workflow': {
|
|
1115
|
+
const validated = validation_1.RunWorkflowSchema.parse(args);
|
|
1116
|
+
const result = await this.client.runWorkflow(validated);
|
|
1117
|
+
return this.formatSuccessResponse(result);
|
|
1118
|
+
}
|
|
1119
|
+
case 'stop_workflow': {
|
|
1120
|
+
const validated = validation_1.StopWorkflowSchema.parse(args);
|
|
1121
|
+
const result = await this.client.stopWorkflow(validated.job_id);
|
|
1122
|
+
return this.formatSuccessResponse(result);
|
|
1123
|
+
}
|
|
1124
|
+
case 'list_mcp_servers': {
|
|
1125
|
+
const validated = validation_1.ListMcpServersSchema.parse(args);
|
|
1126
|
+
const result = await this.client.listMcpServers(validated.action_count !== undefined ? { action_count: validated.action_count } : undefined);
|
|
1127
|
+
return this.formatSuccessResponse(result);
|
|
1128
|
+
}
|
|
1129
|
+
case 'get_mcp_server': {
|
|
1130
|
+
const validated = validation_1.GetMcpServerSchema.parse(args);
|
|
1131
|
+
const result = await this.client.getMcpServer(validated.server_name);
|
|
1132
|
+
return this.formatSuccessResponse(result);
|
|
1133
|
+
}
|
|
1134
|
+
case 'create_mcp_server': {
|
|
1135
|
+
const validated = validation_1.CreateMcpServerSchema.parse(args);
|
|
1136
|
+
const result = await this.client.createMcpServer(validated.server_name, validated.config);
|
|
1137
|
+
return this.formatSuccessResponse(result);
|
|
1138
|
+
}
|
|
1139
|
+
case 'update_mcp_server': {
|
|
1140
|
+
const validated = validation_1.UpdateMcpServerSchema.parse(args);
|
|
1141
|
+
const result = await this.client.updateMcpServer(validated.server_name, validated.config);
|
|
1142
|
+
return this.formatSuccessResponse(result);
|
|
1143
|
+
}
|
|
1144
|
+
case 'delete_mcp_server': {
|
|
1145
|
+
const validated = validation_1.DeleteMcpServerSchema.parse(args);
|
|
1146
|
+
const result = await this.client.deleteMcpServer(validated.server_name);
|
|
1147
|
+
return this.formatSuccessResponse(result);
|
|
1148
|
+
}
|
|
1149
|
+
case 'get_mcp_project_config': {
|
|
1150
|
+
const validated = validation_1.GetMcpProjectConfigSchema.parse(args);
|
|
1151
|
+
const result = await this.client.getMcpProjectConfig(validated.project_id, validated.mcp_enabled !== undefined ? { mcp_enabled: validated.mcp_enabled } : undefined);
|
|
1152
|
+
return this.formatSuccessResponse(result);
|
|
1153
|
+
}
|
|
1154
|
+
case 'update_mcp_project_config': {
|
|
1155
|
+
const validated = validation_1.UpdateMcpProjectConfigSchema.parse(args);
|
|
1156
|
+
const result = await this.client.updateMcpProjectConfig(validated.project_id, {
|
|
1157
|
+
settings: validated.settings,
|
|
1158
|
+
auth_settings: validated.auth_settings
|
|
1159
|
+
});
|
|
1160
|
+
return this.formatSuccessResponse(result);
|
|
1161
|
+
}
|
|
1162
|
+
case 'get_mcp_project_installed': {
|
|
1163
|
+
const validated = validation_1.GetMcpProjectInstalledSchema.parse(args);
|
|
1164
|
+
const result = await this.client.getMcpProjectInstalled(validated.project_id);
|
|
1165
|
+
return this.formatSuccessResponse(result);
|
|
1166
|
+
}
|
|
1167
|
+
case 'install_mcp_project': {
|
|
1168
|
+
const validated = validation_1.InstallMcpProjectSchema.parse(args);
|
|
1169
|
+
const result = await this.client.installMcpProject(validated.project_id, {
|
|
1170
|
+
client: validated.client,
|
|
1171
|
+
transport: validated.transport
|
|
1172
|
+
});
|
|
1173
|
+
return this.formatSuccessResponse(result);
|
|
1174
|
+
}
|
|
1175
|
+
case 'get_mcp_project_composer_url': {
|
|
1176
|
+
const validated = validation_1.GetMcpProjectComposerUrlSchema.parse(args);
|
|
1177
|
+
const result = await this.client.getMcpProjectComposerUrl(validated.project_id);
|
|
1178
|
+
return this.formatSuccessResponse(result);
|
|
1179
|
+
}
|
|
1180
|
+
case 'list_authz_roles': {
|
|
1181
|
+
const validated = validation_1.ListAuthzRolesSchema.parse(args);
|
|
1182
|
+
const result = await this.client.listAuthzRoles(validated);
|
|
1183
|
+
return this.formatSuccessResponse(result);
|
|
1184
|
+
}
|
|
1185
|
+
case 'get_authz_role': {
|
|
1186
|
+
const validated = validation_1.GetAuthzRoleSchema.parse(args);
|
|
1187
|
+
const result = await this.client.getAuthzRole(validated.role_id);
|
|
1188
|
+
return this.formatSuccessResponse(result);
|
|
1189
|
+
}
|
|
1190
|
+
case 'create_authz_role': {
|
|
1191
|
+
const validated = validation_1.CreateAuthzRoleSchema.parse(args);
|
|
1192
|
+
const result = await this.client.createAuthzRole(validated);
|
|
1193
|
+
return this.formatSuccessResponse(result);
|
|
1194
|
+
}
|
|
1195
|
+
case 'update_authz_role': {
|
|
1196
|
+
const validated = validation_1.UpdateAuthzRoleSchema.parse(args);
|
|
1197
|
+
const { role_id, ...body } = validated;
|
|
1198
|
+
const result = await this.client.updateAuthzRole(role_id, body);
|
|
1199
|
+
return this.formatSuccessResponse(result);
|
|
1200
|
+
}
|
|
1201
|
+
case 'delete_authz_role': {
|
|
1202
|
+
const validated = validation_1.DeleteAuthzRoleSchema.parse(args);
|
|
1203
|
+
await this.client.deleteAuthzRole(validated.role_id);
|
|
1204
|
+
return this.formatSuccessResponse({
|
|
1205
|
+
success: true,
|
|
1206
|
+
message: 'Role deleted successfully'
|
|
1207
|
+
});
|
|
1208
|
+
}
|
|
1209
|
+
case 'list_authz_role_assignments': {
|
|
1210
|
+
const validated = validation_1.ListAuthzRoleAssignmentsSchema.parse(args);
|
|
1211
|
+
const result = await this.client.listAuthzRoleAssignments(validated);
|
|
1212
|
+
return this.formatSuccessResponse(result);
|
|
1213
|
+
}
|
|
1214
|
+
case 'create_authz_role_assignment': {
|
|
1215
|
+
const validated = validation_1.CreateAuthzRoleAssignmentSchema.parse(args);
|
|
1216
|
+
const result = await this.client.createAuthzRoleAssignment(validated);
|
|
1217
|
+
return this.formatSuccessResponse(result);
|
|
1218
|
+
}
|
|
1219
|
+
case 'delete_authz_role_assignment': {
|
|
1220
|
+
const validated = validation_1.DeleteAuthzRoleAssignmentSchema.parse(args);
|
|
1221
|
+
await this.client.deleteAuthzRoleAssignment(validated.assignment_id);
|
|
1222
|
+
return this.formatSuccessResponse({
|
|
1223
|
+
success: true,
|
|
1224
|
+
message: 'Role assignment deleted successfully'
|
|
1225
|
+
});
|
|
1226
|
+
}
|
|
1227
|
+
case 'list_authz_teams': {
|
|
1228
|
+
const validated = validation_1.ListAuthzTeamsSchema.parse(args);
|
|
1229
|
+
const result = await this.client.listAuthzTeams(validated);
|
|
1230
|
+
return this.formatSuccessResponse(result);
|
|
1231
|
+
}
|
|
1232
|
+
case 'get_authz_team': {
|
|
1233
|
+
const validated = validation_1.GetAuthzTeamSchema.parse(args);
|
|
1234
|
+
const result = await this.client.getAuthzTeam(validated.team_id);
|
|
1235
|
+
return this.formatSuccessResponse(result);
|
|
1236
|
+
}
|
|
1237
|
+
case 'create_authz_team': {
|
|
1238
|
+
const validated = validation_1.CreateAuthzTeamSchema.parse(args);
|
|
1239
|
+
const result = await this.client.createAuthzTeam(validated);
|
|
1240
|
+
return this.formatSuccessResponse(result);
|
|
1241
|
+
}
|
|
1242
|
+
case 'update_authz_team': {
|
|
1243
|
+
const validated = validation_1.UpdateAuthzTeamSchema.parse(args);
|
|
1244
|
+
const { team_id, ...body } = validated;
|
|
1245
|
+
const result = await this.client.updateAuthzTeam(team_id, body);
|
|
1246
|
+
return this.formatSuccessResponse(result);
|
|
1247
|
+
}
|
|
1248
|
+
case 'delete_authz_team': {
|
|
1249
|
+
const validated = validation_1.DeleteAuthzTeamSchema.parse(args);
|
|
1250
|
+
await this.client.deleteAuthzTeam(validated.team_id);
|
|
1251
|
+
return this.formatSuccessResponse({
|
|
1252
|
+
success: true,
|
|
1253
|
+
message: 'Team deleted successfully'
|
|
1254
|
+
});
|
|
1255
|
+
}
|
|
1256
|
+
case 'list_authz_team_members': {
|
|
1257
|
+
const validated = validation_1.ListAuthzTeamMembersSchema.parse(args);
|
|
1258
|
+
const { team_id, ...params } = validated;
|
|
1259
|
+
const result = await this.client.listAuthzTeamMembers(team_id, params);
|
|
1260
|
+
return this.formatSuccessResponse(result);
|
|
1261
|
+
}
|
|
1262
|
+
case 'add_authz_team_member': {
|
|
1263
|
+
const validated = validation_1.AddAuthzTeamMemberSchema.parse(args);
|
|
1264
|
+
const { team_id, ...body } = validated;
|
|
1265
|
+
const result = await this.client.addAuthzTeamMember(team_id, body);
|
|
1266
|
+
return this.formatSuccessResponse(result);
|
|
1267
|
+
}
|
|
1268
|
+
case 'remove_authz_team_member': {
|
|
1269
|
+
const validated = validation_1.RemoveAuthzTeamMemberSchema.parse(args);
|
|
1270
|
+
await this.client.removeAuthzTeamMember(validated.team_id, validated.user_id);
|
|
1271
|
+
return this.formatSuccessResponse({
|
|
1272
|
+
success: true,
|
|
1273
|
+
message: 'Team member removed successfully'
|
|
1274
|
+
});
|
|
1275
|
+
}
|
|
1276
|
+
case 'list_authz_shares': {
|
|
1277
|
+
const validated = validation_1.ListAuthzSharesSchema.parse(args);
|
|
1278
|
+
const result = await this.client.listAuthzShares(validated);
|
|
1279
|
+
return this.formatSuccessResponse(result);
|
|
1280
|
+
}
|
|
1281
|
+
case 'get_authz_share': {
|
|
1282
|
+
const validated = validation_1.GetAuthzShareSchema.parse(args);
|
|
1283
|
+
const result = await this.client.getAuthzShare(validated.share_id);
|
|
1284
|
+
return this.formatSuccessResponse(result);
|
|
1285
|
+
}
|
|
1286
|
+
case 'create_authz_share': {
|
|
1287
|
+
const validated = validation_1.CreateAuthzShareSchema.parse(args);
|
|
1288
|
+
const result = await this.client.createAuthzShare(validated);
|
|
1289
|
+
return this.formatSuccessResponse(result);
|
|
1290
|
+
}
|
|
1291
|
+
case 'update_authz_share': {
|
|
1292
|
+
const validated = validation_1.UpdateAuthzShareSchema.parse(args);
|
|
1293
|
+
const result = await this.client.updateAuthzShare(validated.share_id, {
|
|
1294
|
+
permission_level: validated.permission_level
|
|
1295
|
+
});
|
|
1296
|
+
return this.formatSuccessResponse(result);
|
|
1297
|
+
}
|
|
1298
|
+
case 'delete_authz_share': {
|
|
1299
|
+
const validated = validation_1.DeleteAuthzShareSchema.parse(args);
|
|
1300
|
+
await this.client.deleteAuthzShare(validated.share_id);
|
|
1301
|
+
return this.formatSuccessResponse({
|
|
1302
|
+
success: true,
|
|
1303
|
+
message: 'Share deleted successfully'
|
|
1304
|
+
});
|
|
1305
|
+
}
|
|
1306
|
+
case 'get_authz_audit': {
|
|
1307
|
+
const validated = validation_1.GetAuthzAuditSchema.parse(args);
|
|
1308
|
+
const result = await this.client.getAuthzAudit(validated);
|
|
1309
|
+
return this.formatSuccessResponse(result);
|
|
1310
|
+
}
|
|
1311
|
+
case 'get_my_permissions': {
|
|
1312
|
+
const validated = validation_1.GetMyPermissionsSchema.parse(args);
|
|
1313
|
+
const result = await this.client.getMyPermissions(validated);
|
|
1314
|
+
return this.formatSuccessResponse(result);
|
|
1315
|
+
}
|
|
1316
|
+
case 'create_memory_base': {
|
|
1317
|
+
const validated = validation_1.CreateMemoryBaseSchema.parse(args);
|
|
1318
|
+
const result = await this.client.createMemoryBase(validated);
|
|
1319
|
+
return this.formatSuccessResponse(result);
|
|
1320
|
+
}
|
|
1321
|
+
case 'list_memory_bases': {
|
|
1322
|
+
const validated = validation_1.ListMemoryBasesSchema.parse(args);
|
|
1323
|
+
const result = await this.client.listMemoryBases(validated);
|
|
1324
|
+
return this.formatSuccessResponse(result);
|
|
1325
|
+
}
|
|
1326
|
+
case 'get_memory_base': {
|
|
1327
|
+
const validated = validation_1.GetMemoryBaseSchema.parse(args);
|
|
1328
|
+
const result = await this.client.getMemoryBase(validated.memory_base_id);
|
|
1329
|
+
return this.formatSuccessResponse(result);
|
|
1330
|
+
}
|
|
1331
|
+
case 'list_memory_base_sessions': {
|
|
1332
|
+
const validated = validation_1.ListMemoryBaseSessionsSchema.parse(args);
|
|
1333
|
+
const { memory_base_id, ...params } = validated;
|
|
1334
|
+
const result = await this.client.listMemoryBaseSessions(memory_base_id, params);
|
|
1335
|
+
return this.formatSuccessResponse(result);
|
|
1336
|
+
}
|
|
1337
|
+
case 'list_memory_base_messages': {
|
|
1338
|
+
const validated = validation_1.ListMemoryBaseMessagesSchema.parse(args);
|
|
1339
|
+
const { memory_base_id, ...params } = validated;
|
|
1340
|
+
const result = await this.client.listMemoryBaseMessages(memory_base_id, params);
|
|
1341
|
+
return this.formatSuccessResponse(result);
|
|
1342
|
+
}
|
|
1343
|
+
case 'update_memory_base': {
|
|
1344
|
+
const validated = validation_1.UpdateMemoryBaseSchema.parse(args);
|
|
1345
|
+
const { memory_base_id, ...body } = validated;
|
|
1346
|
+
const result = await this.client.updateMemoryBase(memory_base_id, body);
|
|
1347
|
+
return this.formatSuccessResponse(result);
|
|
1348
|
+
}
|
|
1349
|
+
case 'delete_memory_base': {
|
|
1350
|
+
const validated = validation_1.DeleteMemoryBaseSchema.parse(args);
|
|
1351
|
+
await this.client.deleteMemoryBase(validated.memory_base_id);
|
|
1352
|
+
return this.formatSuccessResponse({
|
|
1353
|
+
success: true,
|
|
1354
|
+
message: 'Memory base deleted successfully'
|
|
1355
|
+
});
|
|
1356
|
+
}
|
|
1357
|
+
case 'flush_memory_base': {
|
|
1358
|
+
const validated = validation_1.FlushMemoryBaseSchema.parse(args);
|
|
1359
|
+
const result = await this.client.flushMemoryBase(validated.memory_base_id, {
|
|
1360
|
+
session_id: validated.session_id
|
|
1361
|
+
});
|
|
1362
|
+
return this.formatSuccessResponse(result);
|
|
1363
|
+
}
|
|
1364
|
+
case 'check_memory_base_mismatch': {
|
|
1365
|
+
const validated = validation_1.CheckMemoryBaseMismatchSchema.parse(args);
|
|
1366
|
+
const result = await this.client.checkMemoryBaseMismatch(validated.memory_base_id);
|
|
1367
|
+
return this.formatSuccessResponse(result);
|
|
1368
|
+
}
|
|
1369
|
+
case 'regenerate_memory_base': {
|
|
1370
|
+
const validated = validation_1.RegenerateMemoryBaseSchema.parse(args);
|
|
1371
|
+
const result = await this.client.regenerateMemoryBase(validated.memory_base_id);
|
|
1372
|
+
return this.formatSuccessResponse(result);
|
|
1373
|
+
}
|
|
1374
|
+
case 'test_knowledge_base_connection': {
|
|
1375
|
+
const validated = validation_1.TestKnowledgeBaseConnectionSchema.parse(args);
|
|
1376
|
+
const result = await this.client.testKnowledgeBaseConnection(validated);
|
|
1377
|
+
return this.formatSuccessResponse(result);
|
|
1378
|
+
}
|
|
1379
|
+
case 'list_knowledge_base_connectors': {
|
|
1380
|
+
validation_1.ListKnowledgeBaseConnectorsSchema.parse(args);
|
|
1381
|
+
const result = await this.client.listKnowledgeBaseConnectors();
|
|
1382
|
+
return this.formatSuccessResponse(result);
|
|
1383
|
+
}
|
|
1384
|
+
case 'ingest_knowledge_base_folder': {
|
|
1385
|
+
const validated = validation_1.IngestKnowledgeBaseFolderSchema.parse(args);
|
|
1386
|
+
const { kb_name, ...body } = validated;
|
|
1387
|
+
const result = await this.client.ingestKnowledgeBaseFolder(kb_name, body);
|
|
1388
|
+
return this.formatSuccessResponse(result);
|
|
1389
|
+
}
|
|
1390
|
+
case 'ingest_knowledge_base_connector': {
|
|
1391
|
+
const validated = validation_1.IngestKnowledgeBaseConnectorSchema.parse(args);
|
|
1392
|
+
const { kb_name, ...body } = validated;
|
|
1393
|
+
const result = await this.client.ingestKnowledgeBaseConnector(kb_name, body);
|
|
1394
|
+
return this.formatSuccessResponse(result);
|
|
1395
|
+
}
|
|
1396
|
+
case 'get_knowledge_base_metadata_keys': {
|
|
1397
|
+
const validated = validation_1.GetKnowledgeBaseMetadataKeysSchema.parse(args);
|
|
1398
|
+
const result = await this.client.getKnowledgeBaseMetadataKeys(validated.kb_name);
|
|
1399
|
+
return this.formatSuccessResponse(result);
|
|
1400
|
+
}
|
|
1401
|
+
case 'list_knowledge_base_runs': {
|
|
1402
|
+
const validated = validation_1.ListKnowledgeBaseRunsSchema.parse(args);
|
|
1403
|
+
const { kb_name, ...params } = validated;
|
|
1404
|
+
const result = await this.client.listKnowledgeBaseRuns(kb_name, params);
|
|
1405
|
+
return this.formatSuccessResponse(result);
|
|
1406
|
+
}
|
|
1407
|
+
case 'get_knowledge_base_run': {
|
|
1408
|
+
const validated = validation_1.GetKnowledgeBaseRunSchema.parse(args);
|
|
1409
|
+
const result = await this.client.getKnowledgeBaseRun(validated.kb_name, validated.run_id);
|
|
1410
|
+
return this.formatSuccessResponse(result);
|
|
1411
|
+
}
|
|
1412
|
+
case 'reload_extension_bundle': {
|
|
1413
|
+
const validated = validation_1.ReloadExtensionBundleSchema.parse(args);
|
|
1414
|
+
const result = await this.client.reloadExtensionBundle(validated.extension_id, validated.bundle_name);
|
|
1415
|
+
return this.formatSuccessResponse(result);
|
|
1416
|
+
}
|
|
1417
|
+
case 'get_extension_events': {
|
|
1418
|
+
const validated = validation_1.GetExtensionEventsSchema.parse(args);
|
|
1419
|
+
const result = await this.client.getExtensionEvents(validated);
|
|
1420
|
+
return this.formatSuccessResponse(result);
|
|
1421
|
+
}
|
|
1422
|
+
case 'get_agentic_file': {
|
|
1423
|
+
const validated = validation_1.GetAgenticFileSchema.parse(args);
|
|
1424
|
+
const result = await this.client.getAgenticFile(validated);
|
|
1425
|
+
return this.formatSuccessResponse(result);
|
|
1426
|
+
}
|
|
1427
|
+
case 'reset_agentic_session': {
|
|
1428
|
+
const validated = validation_1.ResetAgenticSessionSchema.parse(args);
|
|
1429
|
+
const result = await this.client.resetAgenticSession(validated);
|
|
1430
|
+
return this.formatSuccessResponse(result);
|
|
1431
|
+
}
|
|
1432
|
+
case 'get_flow_note_translations': {
|
|
1433
|
+
const validated = validation_1.GetFlowNoteTranslationsSchema.parse(args);
|
|
1434
|
+
const result = await this.client.getFlowNoteTranslations(validated.flow_id);
|
|
1435
|
+
return this.formatSuccessResponse(result);
|
|
1436
|
+
}
|
|
1437
|
+
case 'get_job_queue_metrics': {
|
|
1438
|
+
validation_1.GetJobQueueMetricsSchema.parse(args);
|
|
1439
|
+
const result = await this.client.getJobQueueMetrics();
|
|
1440
|
+
return this.formatSuccessResponse(result);
|
|
1441
|
+
}
|
|
1442
|
+
case 'list_a2a_agents': {
|
|
1443
|
+
validation_1.ListA2aAgentsSchema.parse(args);
|
|
1444
|
+
const result = await this.client.listA2aAgents();
|
|
1445
|
+
return this.formatSuccessResponse(result);
|
|
1446
|
+
}
|
|
1447
|
+
case 'get_a2a_agent_card': {
|
|
1448
|
+
const validated = validation_1.GetA2aAgentCardSchema.parse(args);
|
|
1449
|
+
const result = await this.client.getA2aAgentCard(validated.flow_id);
|
|
1450
|
+
return this.formatSuccessResponse(result);
|
|
1451
|
+
}
|
|
1452
|
+
case 'invoke_a2a_jsonrpc': {
|
|
1453
|
+
const validated = validation_1.InvokeA2aJsonrpcSchema.parse(args);
|
|
1454
|
+
const { flow_id, ...body } = validated;
|
|
1455
|
+
const result = await this.client.invokeA2aJsonrpc(flow_id, body);
|
|
1456
|
+
return this.formatSuccessResponse(result);
|
|
1457
|
+
}
|
|
1458
|
+
case 'list_pending_workflows': {
|
|
1459
|
+
const validated = validation_1.ListPendingWorkflowsSchema.parse(args);
|
|
1460
|
+
const result = await this.client.listPendingWorkflows(validated.flow_id ? { flow_id: validated.flow_id } : undefined);
|
|
1461
|
+
return this.formatSuccessResponse(result);
|
|
1462
|
+
}
|
|
1463
|
+
case 'get_workflow_events': {
|
|
1464
|
+
const validated = validation_1.GetWorkflowEventsSchema.parse(args);
|
|
1465
|
+
const result = await this.client.getWorkflowEvents(validated.job_id);
|
|
1466
|
+
return this.formatSuccessResponse(result);
|
|
1467
|
+
}
|
|
1468
|
+
case 'resume_workflow': {
|
|
1469
|
+
const validated = validation_1.ResumeWorkflowSchema.parse(args);
|
|
1470
|
+
const { job_id, ...body } = validated;
|
|
1471
|
+
const result = await this.client.resumeWorkflow(job_id, body);
|
|
1472
|
+
return this.formatSuccessResponse(result);
|
|
1473
|
+
}
|
|
1474
|
+
case 'run_public_workflow': {
|
|
1475
|
+
const validated = validation_1.RunPublicWorkflowSchema.parse(args);
|
|
1476
|
+
const result = await this.client.runPublicWorkflow(validated);
|
|
1477
|
+
return this.formatSuccessResponse(result);
|
|
1478
|
+
}
|
|
782
1479
|
default:
|
|
783
1480
|
throw new Error(`Unknown tool: ${name}`);
|
|
784
1481
|
}
|