langflow-mcp-server 1.1.1 → 2.0.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 (63) hide show
  1. package/README.md +90 -2
  2. package/dist/__tests__/fixtures/advanced-execution.d.ts +22 -0
  3. package/dist/__tests__/fixtures/advanced-execution.d.ts.map +1 -0
  4. package/dist/__tests__/fixtures/advanced-execution.js +77 -0
  5. package/dist/__tests__/fixtures/advanced-execution.js.map +1 -0
  6. package/dist/__tests__/fixtures/api-keys.d.ts +8 -0
  7. package/dist/__tests__/fixtures/api-keys.d.ts.map +1 -0
  8. package/dist/__tests__/fixtures/api-keys.js +38 -0
  9. package/dist/__tests__/fixtures/api-keys.js.map +1 -0
  10. package/dist/__tests__/fixtures/auth.d.ts +9 -0
  11. package/dist/__tests__/fixtures/auth.d.ts.map +1 -0
  12. package/dist/__tests__/fixtures/auth.js +26 -0
  13. package/dist/__tests__/fixtures/auth.js.map +1 -0
  14. package/dist/__tests__/fixtures/custom-components.d.ts +5 -0
  15. package/dist/__tests__/fixtures/custom-components.d.ts.map +1 -0
  16. package/dist/__tests__/fixtures/custom-components.js +49 -0
  17. package/dist/__tests__/fixtures/custom-components.js.map +1 -0
  18. package/dist/__tests__/fixtures/files.d.ts +14 -0
  19. package/dist/__tests__/fixtures/files.d.ts.map +1 -0
  20. package/dist/__tests__/fixtures/files.js +41 -0
  21. package/dist/__tests__/fixtures/files.js.map +1 -0
  22. package/dist/__tests__/fixtures/misc.d.ts +18 -0
  23. package/dist/__tests__/fixtures/misc.d.ts.map +1 -0
  24. package/dist/__tests__/fixtures/misc.js +101 -0
  25. package/dist/__tests__/fixtures/misc.js.map +1 -0
  26. package/dist/__tests__/fixtures/monitoring.d.ts +13 -0
  27. package/dist/__tests__/fixtures/monitoring.d.ts.map +1 -0
  28. package/dist/__tests__/fixtures/monitoring.js +88 -0
  29. package/dist/__tests__/fixtures/monitoring.js.map +1 -0
  30. package/dist/__tests__/fixtures/store.d.ts +18 -0
  31. package/dist/__tests__/fixtures/store.d.ts.map +1 -0
  32. package/dist/__tests__/fixtures/store.js +96 -0
  33. package/dist/__tests__/fixtures/store.js.map +1 -0
  34. package/dist/__tests__/fixtures/users.d.ts +9 -0
  35. package/dist/__tests__/fixtures/users.d.ts.map +1 -0
  36. package/dist/__tests__/fixtures/users.js +55 -0
  37. package/dist/__tests__/fixtures/users.js.map +1 -0
  38. package/dist/__tests__/fixtures/validation.d.ts +10 -0
  39. package/dist/__tests__/fixtures/validation.d.ts.map +1 -0
  40. package/dist/__tests__/fixtures/validation.js +43 -0
  41. package/dist/__tests__/fixtures/validation.js.map +1 -0
  42. package/dist/__tests__/fixtures/vertices.d.ts +29 -0
  43. package/dist/__tests__/fixtures/vertices.d.ts.map +1 -0
  44. package/dist/__tests__/fixtures/vertices.js +51 -0
  45. package/dist/__tests__/fixtures/vertices.js.map +1 -0
  46. package/dist/mcp/server.d.ts +2 -0
  47. package/dist/mcp/server.d.ts.map +1 -1
  48. package/dist/mcp/server.js +344 -5
  49. package/dist/mcp/server.js.map +1 -1
  50. package/dist/mcp/tools.d.ts.map +1 -1
  51. package/dist/mcp/tools.js +1871 -10
  52. package/dist/mcp/tools.js.map +1 -1
  53. package/dist/mcp/validation.d.ts +276 -35
  54. package/dist/mcp/validation.d.ts.map +1 -1
  55. package/dist/mcp/validation.js +246 -37
  56. package/dist/mcp/validation.js.map +1 -1
  57. package/dist/services/langflow-client.d.ts +131 -1
  58. package/dist/services/langflow-client.d.ts.map +1 -1
  59. package/dist/services/langflow-client.js +843 -1
  60. package/dist/services/langflow-client.js.map +1 -1
  61. package/dist/types/index.d.ts +232 -0
  62. package/dist/types/index.d.ts.map +1 -1
  63. package/package.json +2 -1
package/dist/mcp/tools.js CHANGED
@@ -4,7 +4,51 @@ exports.langflowMCPTools = void 0;
4
4
  exports.langflowMCPTools = [
5
5
  {
6
6
  name: 'create_flow',
7
- description: 'Create a new Langflow flow. Pass name and optional description, data, folder_id.',
7
+ description: `Create a new Langflow workflow with optional configuration and organization.
8
+
9
+ Purpose: Initialize a new flow in your Langflow instance. Use this to create workflows from scratch or with predefined structure. The flow can be organized into folders and configured with initial data including nodes, edges, and component settings.
10
+
11
+ Parameters:
12
+ - name (required, string, max: 255 chars): The display name of the flow (must be unique within folder)
13
+ - description (optional, string): Brief explanation of flow's purpose and functionality
14
+ - data (optional, object): Initial flow configuration containing nodes, edges, and component definitions
15
+ - folder_id (optional, UUID string): ID of parent folder for organization (use list_folders to get valid IDs)
16
+
17
+ Returns: FlowRead object containing:
18
+ - id (UUID): Newly created flow's unique identifier (save this for future operations)
19
+ - name (string): Flow display name
20
+ - description (string): Flow description
21
+ - folder_id (UUID): Parent folder if specified
22
+ - user_id (UUID): Owner user identifier
23
+ - created_at, updated_at (ISO timestamps): Creation and modification timestamps
24
+ - data (object): Complete flow structure with nodes and edges
25
+
26
+ Usage Examples:
27
+ 1. Create minimal flow: { name: "My Workflow" }
28
+ 2. Flow with description: { name: "Data Pipeline", description: "Processes user data" }
29
+ 3. Flow in folder: { name: "API Flow", folder_id: "folder-uuid-here" }
30
+ 4. Flow with structure: { name: "Chat Bot", data: { nodes: [...], edges: [...] } }
31
+
32
+ Best Practices:
33
+ - Use descriptive names that indicate flow purpose (e.g., "Customer Onboarding" not "Flow1")
34
+ - Add descriptions to document flow functionality for team collaboration
35
+ - Organize related flows using folder_id for better project management
36
+ - Start with minimal configuration, then use update_flow to add complexity
37
+ - Validate data structure before passing complex flow configurations
38
+
39
+ Common Errors:
40
+ - "Flow name already exists": Choose a unique name or specify different folder_id
41
+ - "Invalid folder ID": Ensure folder_id is valid UUID from list_folders
42
+ - "Name is required": Must provide name parameter
43
+ - "Data validation failed": Check that data object follows Langflow schema structure
44
+ - "Unauthorized": Verify LANGFLOW_API_KEY is valid
45
+
46
+ Related Tools:
47
+ - list_flows: View all created flows
48
+ - update_flow: Modify flow after creation
49
+ - get_flow: Retrieve full flow details by ID
50
+ - upload_flow: Import flow from JSON file instead of creating from scratch
51
+ - create_folder: Create folders before organizing flows`,
8
52
  inputSchema: {
9
53
  type: 'object',
10
54
  properties: {
@@ -26,11 +70,61 @@ exports.langflowMCPTools = [
26
70
  }
27
71
  },
28
72
  required: ['name']
73
+ },
74
+ annotations: {
75
+ readOnlyHint: false,
76
+ destructiveHint: false,
77
+ idempotentHint: false,
78
+ openWorldHint: true
29
79
  }
30
80
  },
31
81
  {
32
82
  name: 'list_flows',
33
- description: 'List all Langflow flows with optional pagination and filtering.',
83
+ description: `List Langflow flows with flexible filtering and pagination.
84
+
85
+ Purpose: Retrieve flows from your Langflow instance with optional pagination and organization filters. Essential for discovering available workflows, managing large flow collections, and browsing flows within specific folders.
86
+
87
+ Parameters:
88
+ - page (optional, number, default: 1, min: 1): Page number for pagination
89
+ - size (optional, number, default: 50, max: 100): Number of flows per page
90
+ - folder_id (optional, UUID string): Filter flows within a specific folder
91
+ - components_only (optional, boolean, default: false): Return only component flows (reusable flow components)
92
+ - get_all (optional, boolean, default: true): Retrieve all flows ignoring pagination (use with caution for large datasets)
93
+
94
+ Returns: Array of FlowRead objects containing:
95
+ - id (UUID): Unique flow identifier
96
+ - name (string): Flow display name
97
+ - description (string): Flow purpose description
98
+ - folder_id (UUID): Parent folder if organized
99
+ - user_id (UUID): Owner user identifier
100
+ - created_at, updated_at (ISO timestamps): Flow lifecycle dates
101
+ - data (object): Flow configuration with nodes, edges, and component definitions
102
+
103
+ Usage Examples:
104
+ 1. List recent flows (default): {}
105
+ 2. Paginate through flows: { page: 2, size: 20 }
106
+ 3. Flows in specific folder: { folder_id: "uuid-here" }
107
+ 4. Get all component flows: { components_only: true, get_all: true }
108
+
109
+ Best Practices:
110
+ - Use pagination (page/size) for better performance instead of get_all
111
+ - Filter by folder_id when working within organized projects
112
+ - Keep page size <= 50 for optimal response times
113
+ - Cache folder_id values to reduce API calls
114
+ - Use get_all sparingly, only when you need complete dataset
115
+
116
+ Common Errors:
117
+ - "Page size cannot exceed 100": Reduce size parameter to 100 or less
118
+ - "Invalid folder ID format": Ensure folder_id is a valid UUID (use list_folders to get valid IDs)
119
+ - Empty results: Check if folder_id exists or try removing filters
120
+ - Connection timeout: Reduce page size or enable pagination instead of get_all
121
+
122
+ Related Tools:
123
+ - create_flow: Create new flows after listing existing ones
124
+ - get_flow: Retrieve complete flow details by ID from this list
125
+ - list_folders: Find valid folder_id values for filtering
126
+ - update_flow: Modify flows found in this list
127
+ - delete_flow: Remove flows identified in this list`,
34
128
  inputSchema: {
35
129
  type: 'object',
36
130
  properties: {
@@ -55,11 +149,62 @@ exports.langflowMCPTools = [
55
149
  description: 'Get all flows without pagination (default: true)'
56
150
  }
57
151
  }
152
+ },
153
+ annotations: {
154
+ readOnlyHint: true,
155
+ destructiveHint: false,
156
+ idempotentHint: true,
157
+ openWorldHint: true
58
158
  }
59
159
  },
60
160
  {
61
161
  name: 'get_flow',
62
- description: 'Get details of a specific flow by ID.',
162
+ description: `Retrieve complete details and configuration of a specific flow.
163
+
164
+ Purpose: Fetch comprehensive information about a flow including its full node graph, component configurations, connections, and metadata. Essential for inspecting flow structure, debugging workflows, and preparing flows for modification or execution.
165
+
166
+ Parameters:
167
+ - flow_id (required, UUID string): The unique identifier of the flow to retrieve (obtained from list_flows or create_flow)
168
+
169
+ Returns: FlowRead object containing:
170
+ - id (UUID): Flow's unique identifier
171
+ - name (string): Flow display name
172
+ - description (string): Flow purpose description
173
+ - folder_id (UUID): Parent folder identifier if organized
174
+ - user_id (UUID): Owner user identifier
175
+ - created_at, updated_at (ISO timestamps): Flow lifecycle timestamps
176
+ - data (object): Complete flow structure including:
177
+ - nodes (array): All component nodes with their configurations
178
+ - edges (array): Connections between nodes
179
+ - viewport (object): Canvas positioning data
180
+ - description (string): Flow-level documentation
181
+
182
+ Usage Examples:
183
+ 1. Get flow details: { flow_id: "550e8400-e29b-41d4-a716-446655440000" }
184
+ 2. Inspect before modification: { flow_id: "flow-uuid-from-list" }
185
+ 3. Debug flow structure: { flow_id: "failing-flow-uuid" }
186
+
187
+ Best Practices:
188
+ - Use list_flows first to discover available flow_id values
189
+ - Cache flow data locally to reduce API calls when repeatedly accessing same flow
190
+ - Check updated_at timestamp to detect if flow changed since last retrieval
191
+ - Inspect data.nodes to understand flow's component structure
192
+ - Review data.edges to trace data flow between components
193
+ - Validate flow_id format (must be valid UUID) before making request
194
+
195
+ Common Errors:
196
+ - "Flow not found": flow_id doesn't exist or was deleted (verify with list_flows)
197
+ - "Invalid UUID format": flow_id must be valid UUID string (e.g., "550e8400-e29b-41d4-a716-446655440000")
198
+ - "Unauthorized": API key lacks permission to access this flow
199
+ - "Flow ID is required": Must provide flow_id parameter
200
+ - Connection timeout: Check Langflow instance availability and network connectivity
201
+
202
+ Related Tools:
203
+ - list_flows: Find available flow_id values
204
+ - update_flow: Modify flow configuration after retrieval
205
+ - run_flow: Execute flow after inspecting its structure
206
+ - build_flow: Compile and validate flow structure
207
+ - delete_flow: Remove flow after inspection confirms it's no longer needed`,
63
208
  inputSchema: {
64
209
  type: 'object',
65
210
  properties: {
@@ -69,11 +214,71 @@ exports.langflowMCPTools = [
69
214
  }
70
215
  },
71
216
  required: ['flow_id']
217
+ },
218
+ annotations: {
219
+ readOnlyHint: true,
220
+ destructiveHint: false,
221
+ idempotentHint: true,
222
+ openWorldHint: true
72
223
  }
73
224
  },
74
225
  {
75
226
  name: 'update_flow',
76
- description: 'Update an existing flow. Pass flow_id and fields to update.',
227
+ description: `Modify existing flow properties, configuration, or organization.
228
+
229
+ Purpose: Update flow metadata (name, description), modify flow structure (nodes, edges, components), or reorganize flows into different folders. Essential for maintaining flows, fixing configurations, renaming workflows, and managing project organization over time.
230
+
231
+ Parameters:
232
+ - flow_id (required, UUID string): Unique identifier of flow to update (from list_flows or get_flow)
233
+ - name (optional, string, max: 255 chars): New display name for the flow
234
+ - description (optional, string): Updated purpose and functionality description
235
+ - data (optional, object): New flow structure with nodes, edges, and component configurations
236
+ - folder_id (optional, UUID string): Move flow to different folder (use list_folders for valid IDs, null for root level)
237
+
238
+ Returns: FlowRead object containing:
239
+ - id (UUID): Flow's unique identifier (unchanged)
240
+ - name (string): Updated flow name
241
+ - description (string): Updated description
242
+ - folder_id (UUID): New folder location
243
+ - user_id (UUID): Owner identifier
244
+ - created_at (ISO timestamp): Original creation time (unchanged)
245
+ - updated_at (ISO timestamp): Timestamp of this update
246
+ - data (object): Complete updated flow structure
247
+
248
+ Usage Examples:
249
+ 1. Rename flow: { flow_id: "flow-uuid", name: "Improved Customer Bot" }
250
+ 2. Update description: { flow_id: "flow-uuid", description: "Processes customer inquiries with sentiment analysis" }
251
+ 3. Move to folder: { flow_id: "flow-uuid", folder_id: "folder-uuid" }
252
+ 4. Move to root: { flow_id: "flow-uuid", folder_id: null }
253
+ 5. Update structure: { flow_id: "flow-uuid", data: { nodes: [...], edges: [...] } }
254
+ 6. Rename and move: { flow_id: "flow-uuid", name: "New Name", folder_id: "folder-uuid" }
255
+
256
+ Best Practices:
257
+ - Get current flow data with get_flow before updating to avoid overwriting changes
258
+ - Only specify fields you want to change (partial updates supported)
259
+ - Rebuild flow with build_flow after data modifications to validate changes
260
+ - Use descriptive names and descriptions for team collaboration
261
+ - Update description when flow functionality changes significantly
262
+ - Move flows to appropriate folders to maintain organization
263
+ - Verify folder_id exists before moving (use list_folders)
264
+ - Update flow name if purpose or functionality changes
265
+
266
+ Common Errors:
267
+ - "Flow not found": flow_id doesn't exist or was deleted (verify with list_flows)
268
+ - "Flow name already exists": Choose unique name within target folder
269
+ - "Invalid folder ID": folder_id is not valid UUID (use list_folders to get valid IDs)
270
+ - "Folder not found": Specified folder_id doesn't exist
271
+ - "Invalid flow data structure": data object doesn't match Langflow schema
272
+ - "Concurrent modification": Flow was updated by another user (re-fetch with get_flow)
273
+ - "flow_id is required": Must provide flow_id parameter
274
+ - "Unauthorized": API key lacks permission to modify this flow
275
+
276
+ Related Tools:
277
+ - get_flow: Retrieve current flow state before updating
278
+ - build_flow: Validate flow after data modifications
279
+ - list_flows: Find flow_id for flows to update
280
+ - list_folders: Get valid folder_id values for reorganization
281
+ - create_flow: Create new flow instead of modifying existing one`,
77
282
  inputSchema: {
78
283
  type: 'object',
79
284
  properties: {
@@ -99,11 +304,54 @@ exports.langflowMCPTools = [
99
304
  }
100
305
  },
101
306
  required: ['flow_id']
307
+ },
308
+ annotations: {
309
+ readOnlyHint: false,
310
+ destructiveHint: false,
311
+ idempotentHint: true,
312
+ openWorldHint: true
102
313
  }
103
314
  },
104
315
  {
105
316
  name: 'delete_flow',
106
- description: 'Delete a single flow by ID.',
317
+ description: `Permanently remove a single flow from Langflow instance.
318
+
319
+ Purpose: Delete flows that are no longer needed, removing obsolete workflows, or cleaning up test/development flows. This operation is destructive and irreversible - deleted flows cannot be recovered unless previously backed up via download_flows.
320
+
321
+ Parameters:
322
+ - flow_id (required, UUID string): Unique identifier of flow to delete (from list_flows or get_flow)
323
+
324
+ Returns: Success object containing:
325
+ - success (boolean): true if deletion succeeded
326
+ - message (string): Confirmation message
327
+
328
+ Usage Examples:
329
+ 1. Delete single flow: { flow_id: "550e8400-e29b-41d4-a716-446655440000" }
330
+ 2. Remove test flow: { flow_id: "test-flow-uuid" }
331
+
332
+ Best Practices:
333
+ - Download flow backup with download_flows before deletion if you might need it later
334
+ - Verify flow_id is correct using get_flow before deleting to avoid mistakes
335
+ - Check if flow is used in production or referenced by other systems before deletion
336
+ - Document why flow was deleted for audit purposes
337
+ - For deleting multiple flows, use delete_flows (batch operation) instead
338
+ - Review flow contents one final time before permanent removal
339
+ - Consider archiving flows to dedicated folder instead of deleting
340
+ - Ensure no running jobs or active sessions using this flow
341
+
342
+ Common Errors:
343
+ - "Flow not found": flow_id doesn't exist or already deleted (verify with list_flows)
344
+ - "Invalid UUID format": flow_id must be valid UUID string
345
+ - "Cannot delete running flow": Flow has active execution (wait for completion or cancel)
346
+ - "flow_id is required": Must provide flow_id parameter
347
+ - "Unauthorized": API key lacks permission to delete this flow
348
+ - "Flow is referenced": Flow is used as component in other flows (remove references first)
349
+
350
+ Related Tools:
351
+ - download_flows: Backup flow before deletion for potential recovery
352
+ - list_flows: Find flow_id for flows to delete
353
+ - get_flow: Inspect flow before deletion to confirm it's the right one
354
+ - delete_flows: Delete multiple flows at once (more efficient for bulk operations)`,
107
355
  inputSchema: {
108
356
  type: 'object',
109
357
  properties: {
@@ -113,6 +361,12 @@ exports.langflowMCPTools = [
113
361
  }
114
362
  },
115
363
  required: ['flow_id']
364
+ },
365
+ annotations: {
366
+ readOnlyHint: false,
367
+ destructiveHint: true,
368
+ idempotentHint: true,
369
+ openWorldHint: true
116
370
  }
117
371
  },
118
372
  {
@@ -128,6 +382,12 @@ exports.langflowMCPTools = [
128
382
  }
129
383
  },
130
384
  required: ['flow_ids']
385
+ },
386
+ annotations: {
387
+ readOnlyHint: false,
388
+ destructiveHint: true,
389
+ idempotentHint: true,
390
+ openWorldHint: true
131
391
  }
132
392
  },
133
393
  {
@@ -136,11 +396,63 @@ exports.langflowMCPTools = [
136
396
  inputSchema: {
137
397
  type: 'object',
138
398
  properties: {}
399
+ },
400
+ annotations: {
401
+ readOnlyHint: true,
402
+ destructiveHint: false,
403
+ idempotentHint: true,
404
+ openWorldHint: true
139
405
  }
140
406
  },
141
407
  {
142
408
  name: 'run_flow',
143
- description: 'Execute a Langflow flow by ID or name. Returns execution results including outputs and session ID.',
409
+ description: `Execute a Langflow flow with inputs and retrieve execution results.
410
+
411
+ Purpose: Run a workflow and receive its outputs. Essential for testing flows, integrating workflows into applications, and automating tasks. Supports both synchronous execution and streaming for real-time responses from LLM-based flows.
412
+
413
+ Parameters:
414
+ - flow_id_or_name (required, string): Flow identifier (UUID) or flow name (case-sensitive)
415
+ - input_request (required, object): Execution configuration containing:
416
+ - input_value (optional, string): Primary input data for the flow (e.g., user message, data to process)
417
+ - output_type (optional, string): Expected output format (e.g., "chat", "text", "json")
418
+ - input_type (optional, string): Type of input being provided (e.g., "chat", "text", "json")
419
+ - tweaks (optional, object): Component-specific parameter overrides (key: component_id, value: parameter object)
420
+ - stream (optional, boolean, default: false): Enable streaming mode for real-time token-by-token responses
421
+
422
+ Returns: RunResponse object containing:
423
+ - outputs (array): Flow execution results from output components
424
+ - session_id (string): Unique session identifier for conversation continuity
425
+ - Additional fields vary by flow configuration (message, data, artifacts)
426
+
427
+ Usage Examples:
428
+ 1. Simple execution: { flow_id_or_name: "my-chatbot", input_request: { input_value: "Hello" } }
429
+ 2. With output type: { flow_id_or_name: "data-processor", input_request: { input_value: "data", output_type: "json" } }
430
+ 3. With streaming: { flow_id_or_name: "llm-chat", input_request: { input_value: "Explain AI" }, stream: true }
431
+ 4. With tweaks: { flow_id_or_name: "flow-uuid", input_request: { input_value: "test", tweaks: { "component-id": { temperature: 0.7 } } } }
432
+
433
+ Best Practices:
434
+ - Use flow ID (UUID) for production; names may change or conflict
435
+ - Build flow first with build_flow to ensure it's valid before execution
436
+ - Use streaming for LLM-based flows to provide real-time user feedback
437
+ - Cache session_id for multi-turn conversations to maintain context
438
+ - Set appropriate timeout values for long-running flows
439
+ - Test flows with various inputs before production deployment
440
+ - Use tweaks sparingly; prefer configuring flows in Langflow UI
441
+
442
+ Common Errors:
443
+ - "Flow not found": Verify flow_id_or_name exists using list_flows
444
+ - "Flow has not been built": Run build_flow before executing
445
+ - "Invalid input configuration": Ensure input_request matches flow's expected inputs
446
+ - "Component configuration error": Check tweaks object matches component IDs and parameter names
447
+ - "Execution timeout": Flow took too long; increase timeout or optimize flow
448
+ - "Missing required input": Flow expects input_value but none provided
449
+
450
+ Related Tools:
451
+ - build_flow: Compile flow before execution to validate structure
452
+ - get_flow: Inspect flow structure to understand required inputs
453
+ - get_build_status: Check build completion before running flow
454
+ - trigger_webhook: Alternative execution method via webhook endpoint
455
+ - list_flows: Find available flows to execute`,
144
456
  inputSchema: {
145
457
  type: 'object',
146
458
  properties: {
@@ -176,6 +488,12 @@ exports.langflowMCPTools = [
176
488
  }
177
489
  },
178
490
  required: ['flow_id_or_name', 'input_request']
491
+ },
492
+ annotations: {
493
+ readOnlyHint: false,
494
+ destructiveHint: false,
495
+ idempotentHint: false,
496
+ openWorldHint: true
179
497
  }
180
498
  },
181
499
  {
@@ -204,6 +522,12 @@ exports.langflowMCPTools = [
204
522
  }
205
523
  },
206
524
  required: ['flow_id_or_name', 'input_request']
525
+ },
526
+ annotations: {
527
+ readOnlyHint: false,
528
+ destructiveHint: false,
529
+ idempotentHint: false,
530
+ openWorldHint: true
207
531
  }
208
532
  },
209
533
  {
@@ -233,6 +557,12 @@ exports.langflowMCPTools = [
233
557
  }
234
558
  },
235
559
  required: ['file']
560
+ },
561
+ annotations: {
562
+ readOnlyHint: false,
563
+ destructiveHint: false,
564
+ idempotentHint: false,
565
+ openWorldHint: true
236
566
  }
237
567
  },
238
568
  {
@@ -248,6 +578,12 @@ exports.langflowMCPTools = [
248
578
  }
249
579
  },
250
580
  required: ['flow_ids']
581
+ },
582
+ annotations: {
583
+ readOnlyHint: true,
584
+ destructiveHint: false,
585
+ idempotentHint: true,
586
+ openWorldHint: true
251
587
  }
252
588
  },
253
589
  {
@@ -256,11 +592,56 @@ exports.langflowMCPTools = [
256
592
  inputSchema: {
257
593
  type: 'object',
258
594
  properties: {}
595
+ },
596
+ annotations: {
597
+ readOnlyHint: true,
598
+ destructiveHint: false,
599
+ idempotentHint: true,
600
+ openWorldHint: true
259
601
  }
260
602
  },
261
603
  {
262
604
  name: 'list_folders',
263
- description: 'List all folders with optional pagination. Folders help organize flows hierarchically.',
605
+ description: `List all folders with pagination for organizing flows hierarchically.
606
+
607
+ Purpose: Retrieve folders from your Langflow instance to discover organizational structure and obtain folder IDs for flow organization. Essential for understanding project hierarchy, finding folders for flow placement, and managing workspace organization.
608
+
609
+ Parameters:
610
+ - page (optional, number, default: 1, min: 1): Page number for pagination
611
+ - size (optional, number, default: 50, max: 100): Number of folders per page
612
+
613
+ Returns: Array of FolderRead objects containing:
614
+ - id (UUID): Unique folder identifier (use as folder_id in create_flow or update_flow)
615
+ - name (string): Folder display name
616
+ - description (string): Folder purpose description
617
+ - parent_id (UUID): Parent folder ID if nested, null for root-level folders
618
+ - created_at, updated_at (ISO timestamps): Folder lifecycle timestamps
619
+
620
+ Usage Examples:
621
+ 1. List all folders (default): {}
622
+ 2. Paginate through folders: { page: 2, size: 25 }
623
+ 3. Get first 10 folders: { page: 1, size: 10 }
624
+
625
+ Best Practices:
626
+ - Call this before create_flow to find appropriate folder_id for organization
627
+ - Use pagination for large folder collections to improve performance
628
+ - Cache folder IDs and names to reduce API calls
629
+ - Check parent_id to understand folder hierarchy and nesting structure
630
+ - Keep page size <= 50 for optimal response times
631
+ - Map folder IDs to names for user-friendly displays in UIs
632
+
633
+ Common Errors:
634
+ - "Page size cannot exceed 100": Reduce size parameter to 100 or less
635
+ - "Invalid page number": page must be >= 1
636
+ - Empty results: No folders exist (create folders with create_folder)
637
+ - Connection timeout: Reduce page size or check Langflow instance availability
638
+
639
+ Related Tools:
640
+ - create_folder: Create new folders after reviewing existing organization
641
+ - get_folder: Retrieve detailed information about specific folder
642
+ - create_flow: Use folder_id from this list to organize new flows
643
+ - update_folder: Modify folder properties found in this list
644
+ - list_flows: Filter flows by folder_id obtained from this list`,
264
645
  inputSchema: {
265
646
  type: 'object',
266
647
  properties: {
@@ -273,11 +654,61 @@ exports.langflowMCPTools = [
273
654
  description: 'Number of items per page (default: 50, max: 100)'
274
655
  }
275
656
  }
657
+ },
658
+ annotations: {
659
+ readOnlyHint: true,
660
+ destructiveHint: false,
661
+ idempotentHint: true,
662
+ openWorldHint: true
276
663
  }
277
664
  },
278
665
  {
279
666
  name: 'create_folder',
280
- description: 'Create a new folder to organize flows. Supports nested folder structure with parent_id.',
667
+ description: `Create a new folder for organizing flows with optional nested hierarchy.
668
+
669
+ Purpose: Establish organizational structure in Langflow by creating folders to group related flows. Supports hierarchical organization through nested folders, enabling project-based or team-based flow management. Essential for maintaining organized workspace with many flows.
670
+
671
+ Parameters:
672
+ - name (required, string, max: 255 chars): Folder display name (should be descriptive and unique)
673
+ - description (optional, string): Purpose and contents description for documentation
674
+ - parent_id (optional, UUID string): Parent folder ID for creating nested subfolder hierarchy (use list_folders to find valid parent IDs)
675
+
676
+ Returns: FolderRead object containing:
677
+ - id (UUID): Newly created folder's unique identifier (use this as folder_id when creating/organizing flows)
678
+ - name (string): Folder display name
679
+ - description (string): Folder description
680
+ - parent_id (UUID): Parent folder ID if nested, null for root-level folder
681
+ - created_at, updated_at (ISO timestamps): Folder lifecycle timestamps
682
+
683
+ Usage Examples:
684
+ 1. Create root folder: { name: "Production Flows" }
685
+ 2. Folder with description: { name: "Customer Services", description: "Customer-facing automation workflows" }
686
+ 3. Create nested subfolder: { name: "API Integrations", parent_id: "parent-folder-uuid" }
687
+ 4. Project organization: { name: "Q1 2024 Project", description: "First quarter automation initiatives" }
688
+
689
+ Best Practices:
690
+ - Use descriptive, hierarchical names (e.g., "Marketing/Email Campaigns" structure via nesting)
691
+ - Add descriptions to document folder purpose and ownership
692
+ - Plan folder hierarchy before creation (root categories, then subcategories)
693
+ - Create folders before flows to enable immediate organization
694
+ - Use consistent naming conventions across team (e.g., "Team - Project - Category")
695
+ - Limit nesting depth to 2-3 levels for maintainability
696
+ - Cache created folder IDs for subsequent flow creation operations
697
+
698
+ Common Errors:
699
+ - "Folder name already exists": Choose unique name or create in different parent folder
700
+ - "Invalid parent folder ID": Ensure parent_id is valid UUID from list_folders
701
+ - "Parent folder not found": parent_id doesn't exist or was deleted
702
+ - "Name is required": Must provide name parameter
703
+ - "Maximum nesting depth exceeded": Too many nested levels (flatten hierarchy)
704
+ - "Circular reference detected": parent_id creates loop in folder structure
705
+
706
+ Related Tools:
707
+ - list_folders: Browse existing folders before creating new ones
708
+ - update_folder: Modify folder name, description, or move to different parent
709
+ - create_flow: Create flows organized within this folder using returned ID
710
+ - get_folder: Retrieve folder details after creation
711
+ - delete_folder: Remove folder when no longer needed`,
281
712
  inputSchema: {
282
713
  type: 'object',
283
714
  properties: {
@@ -295,6 +726,12 @@ exports.langflowMCPTools = [
295
726
  }
296
727
  },
297
728
  required: ['name']
729
+ },
730
+ annotations: {
731
+ readOnlyHint: false,
732
+ destructiveHint: false,
733
+ idempotentHint: false,
734
+ openWorldHint: true
298
735
  }
299
736
  },
300
737
  {
@@ -309,6 +746,12 @@ exports.langflowMCPTools = [
309
746
  }
310
747
  },
311
748
  required: ['folder_id']
749
+ },
750
+ annotations: {
751
+ readOnlyHint: true,
752
+ destructiveHint: false,
753
+ idempotentHint: true,
754
+ openWorldHint: true
312
755
  }
313
756
  },
314
757
  {
@@ -335,6 +778,12 @@ exports.langflowMCPTools = [
335
778
  }
336
779
  },
337
780
  required: ['folder_id']
781
+ },
782
+ annotations: {
783
+ readOnlyHint: false,
784
+ destructiveHint: false,
785
+ idempotentHint: true,
786
+ openWorldHint: true
338
787
  }
339
788
  },
340
789
  {
@@ -349,6 +798,12 @@ exports.langflowMCPTools = [
349
798
  }
350
799
  },
351
800
  required: ['folder_id']
801
+ },
802
+ annotations: {
803
+ readOnlyHint: false,
804
+ destructiveHint: true,
805
+ idempotentHint: true,
806
+ openWorldHint: true
352
807
  }
353
808
  },
354
809
  {
@@ -366,6 +821,12 @@ exports.langflowMCPTools = [
366
821
  description: 'Number of items per page (default: 50, max: 100)'
367
822
  }
368
823
  }
824
+ },
825
+ annotations: {
826
+ readOnlyHint: true,
827
+ destructiveHint: false,
828
+ idempotentHint: true,
829
+ openWorldHint: true
369
830
  }
370
831
  },
371
832
  {
@@ -384,6 +845,12 @@ exports.langflowMCPTools = [
384
845
  }
385
846
  },
386
847
  required: ['name']
848
+ },
849
+ annotations: {
850
+ readOnlyHint: false,
851
+ destructiveHint: false,
852
+ idempotentHint: false,
853
+ openWorldHint: true
387
854
  }
388
855
  },
389
856
  {
@@ -398,6 +865,12 @@ exports.langflowMCPTools = [
398
865
  }
399
866
  },
400
867
  required: ['project_id']
868
+ },
869
+ annotations: {
870
+ readOnlyHint: true,
871
+ destructiveHint: false,
872
+ idempotentHint: true,
873
+ openWorldHint: true
401
874
  }
402
875
  },
403
876
  {
@@ -420,6 +893,12 @@ exports.langflowMCPTools = [
420
893
  }
421
894
  },
422
895
  required: ['project_id']
896
+ },
897
+ annotations: {
898
+ readOnlyHint: false,
899
+ destructiveHint: false,
900
+ idempotentHint: true,
901
+ openWorldHint: true
423
902
  }
424
903
  },
425
904
  {
@@ -434,6 +913,12 @@ exports.langflowMCPTools = [
434
913
  }
435
914
  },
436
915
  required: ['project_id']
916
+ },
917
+ annotations: {
918
+ readOnlyHint: false,
919
+ destructiveHint: true,
920
+ idempotentHint: true,
921
+ openWorldHint: true
437
922
  }
438
923
  },
439
924
  {
@@ -463,6 +948,12 @@ exports.langflowMCPTools = [
463
948
  }
464
949
  },
465
950
  required: ['file']
951
+ },
952
+ annotations: {
953
+ readOnlyHint: false,
954
+ destructiveHint: false,
955
+ idempotentHint: false,
956
+ openWorldHint: true
466
957
  }
467
958
  },
468
959
  {
@@ -477,6 +968,12 @@ exports.langflowMCPTools = [
477
968
  }
478
969
  },
479
970
  required: ['project_id']
971
+ },
972
+ annotations: {
973
+ readOnlyHint: true,
974
+ destructiveHint: false,
975
+ idempotentHint: true,
976
+ openWorldHint: true
480
977
  }
481
978
  },
482
979
  {
@@ -485,6 +982,12 @@ exports.langflowMCPTools = [
485
982
  inputSchema: {
486
983
  type: 'object',
487
984
  properties: {}
985
+ },
986
+ annotations: {
987
+ readOnlyHint: true,
988
+ destructiveHint: false,
989
+ idempotentHint: true,
990
+ openWorldHint: true
488
991
  }
489
992
  },
490
993
  {
@@ -512,6 +1015,12 @@ exports.langflowMCPTools = [
512
1015
  }
513
1016
  },
514
1017
  required: ['name', 'value']
1018
+ },
1019
+ annotations: {
1020
+ readOnlyHint: false,
1021
+ destructiveHint: false,
1022
+ idempotentHint: false,
1023
+ openWorldHint: true
515
1024
  }
516
1025
  },
517
1026
  {
@@ -538,6 +1047,12 @@ exports.langflowMCPTools = [
538
1047
  }
539
1048
  },
540
1049
  required: ['variable_id']
1050
+ },
1051
+ annotations: {
1052
+ readOnlyHint: false,
1053
+ destructiveHint: false,
1054
+ idempotentHint: true,
1055
+ openWorldHint: true
541
1056
  }
542
1057
  },
543
1058
  {
@@ -552,11 +1067,66 @@ exports.langflowMCPTools = [
552
1067
  }
553
1068
  },
554
1069
  required: ['variable_id']
1070
+ },
1071
+ annotations: {
1072
+ readOnlyHint: false,
1073
+ destructiveHint: true,
1074
+ idempotentHint: true,
1075
+ openWorldHint: true
555
1076
  }
556
1077
  },
557
1078
  {
558
1079
  name: 'build_flow',
559
- description: 'Build/compile a flow and return job_id for polling build status. Critical for programmatic flow building and execution.',
1080
+ description: `Compile and validate a flow, returning job ID for asynchronous status monitoring.
1081
+
1082
+ Purpose: Build and validate a flow's component graph, ensuring all nodes are properly configured and connected. Essential prerequisite for flow execution - detects configuration errors, validates component parameters, and prepares the flow for running. Returns job_id for tracking build progress asynchronously.
1083
+
1084
+ Parameters:
1085
+ - flow_id (required, UUID string): Flow identifier to build and validate
1086
+ - inputs (optional, object): Input values to use during build validation (key: input_name, value: test_data)
1087
+ - data (optional, object): Flow configuration override (use to build modified version without updating flow)
1088
+ - files (optional, array of strings): File paths to include in build context
1089
+ - stop_component_id (optional, string): Component ID where build should stop (useful for partial validation)
1090
+ - start_component_id (optional, string): Component ID where build should start (skip earlier components)
1091
+ - log_builds (optional, boolean, default: true): Enable detailed build logging for debugging
1092
+ - flow_name (optional, string): Override flow name during build (doesn't affect saved flow)
1093
+ - event_delivery (optional, string, default: "polling"): Delivery mode - "polling" (recommended), "streaming", or "direct"
1094
+
1095
+ Returns: BuildFlowResponse object containing:
1096
+ - job_id (UUID): Unique build job identifier for status polling via get_build_status
1097
+
1098
+ Usage Examples:
1099
+ 1. Basic build: { flow_id: "550e8400-e29b-41d4-a716-446655440000" }
1100
+ 2. Build with logging: { flow_id: "flow-uuid", log_builds: true }
1101
+ 3. Build with test inputs: { flow_id: "flow-uuid", inputs: { "user_message": "test" } }
1102
+ 4. Partial build: { flow_id: "flow-uuid", start_component_id: "node-1", stop_component_id: "node-5" }
1103
+ 5. Streaming events: { flow_id: "flow-uuid", event_delivery: "streaming" }
1104
+
1105
+ Best Practices:
1106
+ - Always build flow before first execution to catch configuration errors early
1107
+ - Use polling event_delivery for reliable status tracking in production
1108
+ - Enable log_builds during development for detailed error diagnostics
1109
+ - Rebuild after any flow modifications (nodes, edges, parameters)
1110
+ - Monitor build status with get_build_status using returned job_id
1111
+ - Use partial builds (start/stop component) for faster validation of specific sections
1112
+ - Validate inputs during build to ensure flow accepts expected data format
1113
+ - Cache successful build status to avoid unnecessary rebuilds
1114
+
1115
+ Common Errors:
1116
+ - "Flow not found": flow_id doesn't exist (verify with list_flows or get_flow)
1117
+ - "Invalid flow configuration": Flow has disconnected nodes or missing required parameters
1118
+ - "Component validation failed": Node configuration is invalid (check component settings in Langflow UI)
1119
+ - "Missing required component parameters": Required fields not set on components
1120
+ - "Build timeout": Complex flow took too long; simplify or optimize component chain
1121
+ - "Invalid component ID": start_component_id or stop_component_id doesn't exist in flow
1122
+ - "Circular dependency detected": Flow has loop in node connections
1123
+
1124
+ Related Tools:
1125
+ - get_build_status: Poll build completion and retrieve validation results using job_id
1126
+ - run_flow: Execute flow after successful build
1127
+ - get_flow: Inspect flow structure before building
1128
+ - cancel_build: Stop long-running build job
1129
+ - update_flow: Fix configuration errors found during build`,
560
1130
  inputSchema: {
561
1131
  type: 'object',
562
1132
  properties: {
@@ -599,6 +1169,12 @@ exports.langflowMCPTools = [
599
1169
  }
600
1170
  },
601
1171
  required: ['flow_id']
1172
+ },
1173
+ annotations: {
1174
+ readOnlyHint: false,
1175
+ destructiveHint: false,
1176
+ idempotentHint: true,
1177
+ openWorldHint: true
602
1178
  }
603
1179
  },
604
1180
  {
@@ -617,6 +1193,12 @@ exports.langflowMCPTools = [
617
1193
  }
618
1194
  },
619
1195
  required: ['job_id']
1196
+ },
1197
+ annotations: {
1198
+ readOnlyHint: true,
1199
+ destructiveHint: false,
1200
+ idempotentHint: true,
1201
+ openWorldHint: true
620
1202
  }
621
1203
  },
622
1204
  {
@@ -631,14 +1213,57 @@ exports.langflowMCPTools = [
631
1213
  }
632
1214
  },
633
1215
  required: ['job_id']
1216
+ },
1217
+ annotations: {
1218
+ readOnlyHint: false,
1219
+ destructiveHint: false,
1220
+ idempotentHint: true,
1221
+ openWorldHint: true
634
1222
  }
635
1223
  },
636
1224
  {
637
1225
  name: 'list_knowledge_bases',
638
- description: 'List all available knowledge bases. Essential for RAG workflows and document management.',
1226
+ description: `List all knowledge bases for Retrieval-Augmented Generation (RAG) workflows.
1227
+
1228
+ Purpose: Discover available knowledge bases containing document collections for RAG applications. Essential for understanding what document repositories are available, finding knowledge bases for flow integration, and managing document-based AI applications.
1229
+
1230
+ Parameters: None
1231
+
1232
+ Returns: Array of KnowledgeBaseInfo objects containing:
1233
+ - name (string): Knowledge base identifier/name (use this in get_knowledge_base or delete_knowledge_base)
1234
+ - description (string): Purpose and contents description
1235
+ - Additional metadata varies by knowledge base implementation (document count, vector store info, embedding model)
1236
+
1237
+ Usage Examples:
1238
+ 1. List all knowledge bases: {}
1239
+
1240
+ Best Practices:
1241
+ - Call this before integrating knowledge bases into RAG flows to verify availability
1242
+ - Use knowledge base names in Langflow's Vector Store or RAG components
1243
+ - Document which flows use which knowledge bases for dependency tracking
1244
+ - Monitor knowledge base list to identify unused repositories for cleanup
1245
+ - Cache knowledge base names for flow configuration validation
1246
+ - Verify knowledge base exists before flow execution to avoid runtime errors
1247
+
1248
+ Common Errors:
1249
+ - Empty results: No knowledge bases configured (create knowledge bases in Langflow UI or via API)
1250
+ - Connection timeout: Check Langflow instance availability and vector store connectivity
1251
+ - "Knowledge base service unavailable": Vector store backend not configured or unreachable
1252
+
1253
+ Related Tools:
1254
+ - get_knowledge_base: Retrieve detailed information about specific knowledge base
1255
+ - delete_knowledge_base: Remove individual knowledge base when no longer needed
1256
+ - bulk_delete_knowledge_bases: Clean up multiple knowledge bases at once
1257
+ - create_flow: Build RAG flows using knowledge base names from this list`,
639
1258
  inputSchema: {
640
1259
  type: 'object',
641
1260
  properties: {}
1261
+ },
1262
+ annotations: {
1263
+ readOnlyHint: true,
1264
+ destructiveHint: false,
1265
+ idempotentHint: true,
1266
+ openWorldHint: true
642
1267
  }
643
1268
  },
644
1269
  {
@@ -653,6 +1278,12 @@ exports.langflowMCPTools = [
653
1278
  }
654
1279
  },
655
1280
  required: ['kb_name']
1281
+ },
1282
+ annotations: {
1283
+ readOnlyHint: true,
1284
+ destructiveHint: false,
1285
+ idempotentHint: true,
1286
+ openWorldHint: true
656
1287
  }
657
1288
  },
658
1289
  {
@@ -667,6 +1298,12 @@ exports.langflowMCPTools = [
667
1298
  }
668
1299
  },
669
1300
  required: ['kb_name']
1301
+ },
1302
+ annotations: {
1303
+ readOnlyHint: false,
1304
+ destructiveHint: true,
1305
+ idempotentHint: true,
1306
+ openWorldHint: true
670
1307
  }
671
1308
  },
672
1309
  {
@@ -682,6 +1319,1230 @@ exports.langflowMCPTools = [
682
1319
  }
683
1320
  },
684
1321
  required: ['kb_names']
1322
+ },
1323
+ annotations: {
1324
+ readOnlyHint: false,
1325
+ destructiveHint: true,
1326
+ idempotentHint: true,
1327
+ openWorldHint: true
1328
+ }
1329
+ },
1330
+ {
1331
+ name: 'upload_file',
1332
+ description: 'Upload a file to a specific flow. Supports multipart/form-data for binary file uploads.',
1333
+ inputSchema: {
1334
+ type: 'object',
1335
+ properties: {
1336
+ flow_id: {
1337
+ type: 'string',
1338
+ description: 'Flow ID (UUID) to upload file to'
1339
+ },
1340
+ file_content: {
1341
+ type: 'string',
1342
+ description: 'Base64 encoded file content'
1343
+ },
1344
+ file_name: {
1345
+ type: 'string',
1346
+ description: 'Name of the file to upload'
1347
+ }
1348
+ },
1349
+ required: ['flow_id', 'file_content', 'file_name']
1350
+ },
1351
+ annotations: {
1352
+ readOnlyHint: false,
1353
+ destructiveHint: false,
1354
+ idempotentHint: false,
1355
+ openWorldHint: true
1356
+ }
1357
+ },
1358
+ {
1359
+ name: 'download_file',
1360
+ description: 'Download a specific file from a flow. Returns file content as base64.',
1361
+ inputSchema: {
1362
+ type: 'object',
1363
+ properties: {
1364
+ flow_id: {
1365
+ type: 'string',
1366
+ description: 'Flow ID (UUID) containing the file'
1367
+ },
1368
+ file_name: {
1369
+ type: 'string',
1370
+ description: 'Name of the file to download'
1371
+ }
1372
+ },
1373
+ required: ['flow_id', 'file_name']
1374
+ },
1375
+ annotations: {
1376
+ readOnlyHint: true,
1377
+ destructiveHint: false,
1378
+ idempotentHint: true,
1379
+ openWorldHint: true
1380
+ }
1381
+ },
1382
+ {
1383
+ name: 'list_files',
1384
+ description: 'List all files associated with a specific flow.',
1385
+ inputSchema: {
1386
+ type: 'object',
1387
+ properties: {
1388
+ flow_id: {
1389
+ type: 'string',
1390
+ description: 'Flow ID (UUID) to list files from'
1391
+ }
1392
+ },
1393
+ required: ['flow_id']
1394
+ },
1395
+ annotations: {
1396
+ readOnlyHint: true,
1397
+ destructiveHint: false,
1398
+ idempotentHint: true,
1399
+ openWorldHint: true
1400
+ }
1401
+ },
1402
+ {
1403
+ name: 'delete_file',
1404
+ description: 'Delete a specific file from a flow.',
1405
+ inputSchema: {
1406
+ type: 'object',
1407
+ properties: {
1408
+ flow_id: {
1409
+ type: 'string',
1410
+ description: 'Flow ID (UUID) containing the file'
1411
+ },
1412
+ file_name: {
1413
+ type: 'string',
1414
+ description: 'Name of the file to delete'
1415
+ }
1416
+ },
1417
+ required: ['flow_id', 'file_name']
1418
+ },
1419
+ annotations: {
1420
+ readOnlyHint: false,
1421
+ destructiveHint: true,
1422
+ idempotentHint: true,
1423
+ openWorldHint: true
1424
+ }
1425
+ },
1426
+ {
1427
+ name: 'get_file_image',
1428
+ description: 'Get an image file from a flow. Returns image content as base64.',
1429
+ inputSchema: {
1430
+ type: 'object',
1431
+ properties: {
1432
+ flow_id: {
1433
+ type: 'string',
1434
+ description: 'Flow ID (UUID) containing the image'
1435
+ },
1436
+ file_name: {
1437
+ type: 'string',
1438
+ description: 'Name of the image file to retrieve'
1439
+ }
1440
+ },
1441
+ required: ['flow_id', 'file_name']
1442
+ },
1443
+ annotations: {
1444
+ readOnlyHint: true,
1445
+ destructiveHint: false,
1446
+ idempotentHint: true,
1447
+ openWorldHint: true
1448
+ }
1449
+ },
1450
+ {
1451
+ name: 'list_profile_pictures',
1452
+ description: 'List all available profile pictures.',
1453
+ inputSchema: {
1454
+ type: 'object',
1455
+ properties: {}
1456
+ },
1457
+ annotations: {
1458
+ readOnlyHint: true,
1459
+ destructiveHint: false,
1460
+ idempotentHint: true,
1461
+ openWorldHint: true
1462
+ }
1463
+ },
1464
+ {
1465
+ name: 'get_profile_picture',
1466
+ description: 'Get a specific profile picture by folder and file name.',
1467
+ inputSchema: {
1468
+ type: 'object',
1469
+ properties: {
1470
+ folder_name: {
1471
+ type: 'string',
1472
+ description: 'Folder name containing the profile picture'
1473
+ },
1474
+ file_name: {
1475
+ type: 'string',
1476
+ description: 'Name of the profile picture file'
1477
+ }
1478
+ },
1479
+ required: ['folder_name', 'file_name']
1480
+ },
1481
+ annotations: {
1482
+ readOnlyHint: true,
1483
+ destructiveHint: false,
1484
+ idempotentHint: true,
1485
+ openWorldHint: true
1486
+ }
1487
+ },
1488
+ {
1489
+ name: 'validate_code',
1490
+ description: 'Validate Python code for custom components. Checks syntax and provides error/warning feedback.',
1491
+ inputSchema: {
1492
+ type: 'object',
1493
+ properties: {
1494
+ code: {
1495
+ type: 'string',
1496
+ description: 'Python code to validate'
1497
+ }
1498
+ },
1499
+ required: ['code']
1500
+ },
1501
+ annotations: {
1502
+ readOnlyHint: true,
1503
+ destructiveHint: false,
1504
+ idempotentHint: true,
1505
+ openWorldHint: true
1506
+ }
1507
+ },
1508
+ {
1509
+ name: 'validate_prompt',
1510
+ description: 'Validate prompt template syntax. Checks for valid variable syntax and returns extracted variables.',
1511
+ inputSchema: {
1512
+ type: 'object',
1513
+ properties: {
1514
+ prompt: {
1515
+ type: 'string',
1516
+ description: 'Prompt template to validate'
1517
+ }
1518
+ },
1519
+ required: ['prompt']
1520
+ },
1521
+ annotations: {
1522
+ readOnlyHint: true,
1523
+ destructiveHint: false,
1524
+ idempotentHint: true,
1525
+ openWorldHint: true
1526
+ }
1527
+ },
1528
+ {
1529
+ name: 'check_store',
1530
+ description: 'Check if the Langflow component store is enabled and accessible.',
1531
+ inputSchema: {
1532
+ type: 'object',
1533
+ properties: {}
1534
+ },
1535
+ annotations: {
1536
+ readOnlyHint: true,
1537
+ destructiveHint: false,
1538
+ idempotentHint: true,
1539
+ openWorldHint: true
1540
+ }
1541
+ },
1542
+ {
1543
+ name: 'check_store_api_key',
1544
+ description: 'Validate a store API key for accessing the Langflow component store.',
1545
+ inputSchema: {
1546
+ type: 'object',
1547
+ properties: {
1548
+ api_key: {
1549
+ type: 'string',
1550
+ description: 'Store API key to validate'
1551
+ }
1552
+ },
1553
+ required: ['api_key']
1554
+ },
1555
+ annotations: {
1556
+ readOnlyHint: true,
1557
+ destructiveHint: false,
1558
+ idempotentHint: true,
1559
+ openWorldHint: true
1560
+ }
1561
+ },
1562
+ {
1563
+ name: 'list_store_components',
1564
+ description: 'Browse available components in the Langflow store. Supports pagination, filtering by tags, and search.',
1565
+ inputSchema: {
1566
+ type: 'object',
1567
+ properties: {
1568
+ page: {
1569
+ type: 'number',
1570
+ description: 'Page number for pagination (default: 1)'
1571
+ },
1572
+ limit: {
1573
+ type: 'number',
1574
+ description: 'Number of items per page (default: 50, max: 100)'
1575
+ },
1576
+ tags: {
1577
+ type: 'array',
1578
+ items: { type: 'string' },
1579
+ description: 'Filter by tags'
1580
+ },
1581
+ search: {
1582
+ type: 'string',
1583
+ description: 'Search query for component names/descriptions'
1584
+ }
1585
+ }
1586
+ },
1587
+ annotations: {
1588
+ readOnlyHint: true,
1589
+ destructiveHint: false,
1590
+ idempotentHint: true,
1591
+ openWorldHint: true
1592
+ }
1593
+ },
1594
+ {
1595
+ name: 'get_store_component',
1596
+ description: 'Get detailed information about a specific store component.',
1597
+ inputSchema: {
1598
+ type: 'object',
1599
+ properties: {
1600
+ component_id: {
1601
+ type: 'string',
1602
+ description: 'Store component ID'
1603
+ }
1604
+ },
1605
+ required: ['component_id']
1606
+ },
1607
+ annotations: {
1608
+ readOnlyHint: true,
1609
+ destructiveHint: false,
1610
+ idempotentHint: true,
1611
+ openWorldHint: true
1612
+ }
1613
+ },
1614
+ {
1615
+ name: 'list_store_tags',
1616
+ description: 'List all available component tags in the store.',
1617
+ inputSchema: {
1618
+ type: 'object',
1619
+ properties: {}
1620
+ },
1621
+ annotations: {
1622
+ readOnlyHint: true,
1623
+ destructiveHint: false,
1624
+ idempotentHint: true,
1625
+ openWorldHint: true
1626
+ }
1627
+ },
1628
+ {
1629
+ name: 'get_user_likes',
1630
+ description: 'Get components liked by the current user.',
1631
+ inputSchema: {
1632
+ type: 'object',
1633
+ properties: {}
1634
+ },
1635
+ annotations: {
1636
+ readOnlyHint: true,
1637
+ destructiveHint: false,
1638
+ idempotentHint: true,
1639
+ openWorldHint: true
1640
+ }
1641
+ },
1642
+ {
1643
+ name: 'run_flow_advanced',
1644
+ description: 'Advanced flow execution with full parameter control including tweaks, input/output types, session management, and streaming.',
1645
+ inputSchema: {
1646
+ type: 'object',
1647
+ properties: {
1648
+ flow_id: {
1649
+ type: 'string',
1650
+ description: 'Flow ID (UUID) to execute'
1651
+ },
1652
+ input_value: {
1653
+ type: 'string',
1654
+ description: 'Input value for the flow'
1655
+ },
1656
+ input_type: {
1657
+ type: 'string',
1658
+ description: 'Type of input (e.g., "chat", "text")'
1659
+ },
1660
+ output_type: {
1661
+ type: 'string',
1662
+ description: 'Expected output type (e.g., "chat", "text", "json")'
1663
+ },
1664
+ output_component: {
1665
+ type: 'string',
1666
+ description: 'Specific output component to retrieve results from'
1667
+ },
1668
+ tweaks: {
1669
+ type: 'object',
1670
+ description: 'Component-specific parameter overrides'
1671
+ },
1672
+ session_id: {
1673
+ type: 'string',
1674
+ description: 'Session ID for conversation continuity'
1675
+ },
1676
+ stream: {
1677
+ type: 'boolean',
1678
+ description: 'Enable streaming mode (default: false)'
1679
+ }
1680
+ },
1681
+ required: ['flow_id']
1682
+ },
1683
+ annotations: {
1684
+ readOnlyHint: false,
1685
+ destructiveHint: false,
1686
+ idempotentHint: false,
1687
+ openWorldHint: true
1688
+ }
1689
+ },
1690
+ {
1691
+ name: 'process_flow',
1692
+ description: 'Legacy process endpoint for backward compatibility. Processes a flow with inputs and optional tweaks.',
1693
+ inputSchema: {
1694
+ type: 'object',
1695
+ properties: {
1696
+ flow_id: {
1697
+ type: 'string',
1698
+ description: 'Flow ID (UUID) to process'
1699
+ },
1700
+ inputs: {
1701
+ type: 'object',
1702
+ description: 'Input values for the flow'
1703
+ },
1704
+ tweaks: {
1705
+ type: 'object',
1706
+ description: 'Component-specific parameter overrides'
1707
+ }
1708
+ },
1709
+ required: ['flow_id']
1710
+ },
1711
+ annotations: {
1712
+ readOnlyHint: false,
1713
+ destructiveHint: false,
1714
+ idempotentHint: false,
1715
+ openWorldHint: true
1716
+ }
1717
+ },
1718
+ {
1719
+ name: 'predict_flow',
1720
+ description: 'Legacy predict endpoint for backward compatibility. Predicts flow output with inputs and optional tweaks.',
1721
+ inputSchema: {
1722
+ type: 'object',
1723
+ properties: {
1724
+ flow_id: {
1725
+ type: 'string',
1726
+ description: 'Flow ID (UUID) to predict'
1727
+ },
1728
+ inputs: {
1729
+ type: 'object',
1730
+ description: 'Input values for the flow'
1731
+ },
1732
+ tweaks: {
1733
+ type: 'object',
1734
+ description: 'Component-specific parameter overrides'
1735
+ }
1736
+ },
1737
+ required: ['flow_id']
1738
+ },
1739
+ annotations: {
1740
+ readOnlyHint: false,
1741
+ destructiveHint: false,
1742
+ idempotentHint: false,
1743
+ openWorldHint: true
1744
+ }
1745
+ },
1746
+ {
1747
+ name: 'get_monitor_builds',
1748
+ description: 'Get build execution history for a specific flow. Retrieves vertex build map model containing build status and execution details. Essential for monitoring flow build history, debugging build failures, and tracking build performance over time.',
1749
+ inputSchema: {
1750
+ type: 'object',
1751
+ properties: {
1752
+ flow_id: {
1753
+ type: 'string',
1754
+ format: 'uuid',
1755
+ description: 'Flow ID (UUID) to retrieve build history for'
1756
+ }
1757
+ },
1758
+ required: ['flow_id']
1759
+ },
1760
+ annotations: {
1761
+ readOnlyHint: true,
1762
+ destructiveHint: false,
1763
+ idempotentHint: true,
1764
+ openWorldHint: true
1765
+ }
1766
+ },
1767
+ {
1768
+ name: 'get_monitor_messages',
1769
+ description: 'Query chat/message history with flexible filtering options. Retrieve messages filtered by flow ID, session, sender, or sender name. Supports custom ordering for chronological or reverse-chronological message retrieval. Essential for debugging chat flows, analyzing conversation patterns, and monitoring user interactions.',
1770
+ inputSchema: {
1771
+ type: 'object',
1772
+ properties: {
1773
+ flow_id: {
1774
+ type: 'string',
1775
+ description: 'Optional flow ID (UUID) to filter messages by flow'
1776
+ },
1777
+ session_id: {
1778
+ type: 'string',
1779
+ description: 'Optional session ID to filter messages by session'
1780
+ },
1781
+ sender: {
1782
+ type: 'string',
1783
+ description: 'Optional sender identifier to filter messages'
1784
+ },
1785
+ sender_name: {
1786
+ type: 'string',
1787
+ description: 'Optional sender name to filter messages'
1788
+ },
1789
+ order_by: {
1790
+ type: 'string',
1791
+ description: 'Optional field to order results by (default: timestamp)'
1792
+ }
1793
+ }
1794
+ },
1795
+ annotations: {
1796
+ readOnlyHint: true,
1797
+ destructiveHint: false,
1798
+ idempotentHint: true,
1799
+ openWorldHint: true
1800
+ }
1801
+ },
1802
+ {
1803
+ name: 'get_monitor_message',
1804
+ description: 'Get detailed information about a specific message by ID. Retrieves complete message data including sender, content, timestamp, and metadata. Useful for inspecting individual message details and debugging message-related issues.',
1805
+ inputSchema: {
1806
+ type: 'object',
1807
+ properties: {
1808
+ message_id: {
1809
+ type: 'string',
1810
+ format: 'uuid',
1811
+ description: 'Message ID (UUID) to retrieve'
1812
+ }
1813
+ },
1814
+ required: ['message_id']
1815
+ },
1816
+ annotations: {
1817
+ readOnlyHint: true,
1818
+ destructiveHint: false,
1819
+ idempotentHint: true,
1820
+ openWorldHint: true
1821
+ }
1822
+ },
1823
+ {
1824
+ name: 'get_monitor_sessions',
1825
+ description: 'List all chat session IDs, optionally filtered by flow. Returns array of session identifiers that can be used to query session-specific messages. Essential for discovering active sessions, monitoring concurrent users, and analyzing session patterns.',
1826
+ inputSchema: {
1827
+ type: 'object',
1828
+ properties: {
1829
+ flow_id: {
1830
+ type: 'string',
1831
+ description: 'Optional flow ID (UUID) to filter sessions by flow'
1832
+ }
1833
+ }
1834
+ },
1835
+ annotations: {
1836
+ readOnlyHint: true,
1837
+ destructiveHint: false,
1838
+ idempotentHint: true,
1839
+ openWorldHint: true
1840
+ }
1841
+ },
1842
+ {
1843
+ name: 'get_monitor_session_messages',
1844
+ description: 'Get all messages for a specific session ID. Retrieves complete conversation history for a session in chronological order. Essential for reviewing full conversation context, debugging session-specific issues, and analyzing user interactions within a session.',
1845
+ inputSchema: {
1846
+ type: 'object',
1847
+ properties: {
1848
+ session_id: {
1849
+ type: 'string',
1850
+ description: 'Session ID to retrieve messages for'
1851
+ }
1852
+ },
1853
+ required: ['session_id']
1854
+ },
1855
+ annotations: {
1856
+ readOnlyHint: true,
1857
+ destructiveHint: false,
1858
+ idempotentHint: true,
1859
+ openWorldHint: true
1860
+ }
1861
+ },
1862
+ {
1863
+ name: 'migrate_monitor_session',
1864
+ description: 'Migrate messages from old session ID to new session ID. Updates all messages from the old session to belong to the new session, effectively merging or renaming sessions. Useful for session continuity, combining split sessions, or correcting session identifiers.',
1865
+ inputSchema: {
1866
+ type: 'object',
1867
+ properties: {
1868
+ old_session_id: {
1869
+ type: 'string',
1870
+ description: 'Original session ID to migrate from'
1871
+ },
1872
+ new_session_id: {
1873
+ type: 'string',
1874
+ description: 'Target session ID to migrate to'
1875
+ }
1876
+ },
1877
+ required: ['old_session_id', 'new_session_id']
1878
+ },
1879
+ annotations: {
1880
+ readOnlyHint: false,
1881
+ destructiveHint: false,
1882
+ idempotentHint: true,
1883
+ openWorldHint: true
1884
+ }
1885
+ },
1886
+ {
1887
+ name: 'get_monitor_transactions',
1888
+ description: 'List transaction logs for a flow with pagination support. Retrieves detailed transaction history including execution logs, API calls, and system events. Essential for debugging flow execution, analyzing performance bottlenecks, and monitoring API usage patterns.',
1889
+ inputSchema: {
1890
+ type: 'object',
1891
+ properties: {
1892
+ flow_id: {
1893
+ type: 'string',
1894
+ description: 'Flow ID (UUID) to retrieve transactions for'
1895
+ },
1896
+ page: {
1897
+ type: 'number',
1898
+ description: 'Page number for pagination (default: 1, min: 1)'
1899
+ },
1900
+ size: {
1901
+ type: 'number',
1902
+ description: 'Number of transactions per page (default: 50, max: 100)'
1903
+ }
1904
+ },
1905
+ required: ['flow_id']
1906
+ },
1907
+ annotations: {
1908
+ readOnlyHint: true,
1909
+ destructiveHint: false,
1910
+ idempotentHint: true,
1911
+ openWorldHint: true
1912
+ }
1913
+ },
1914
+ {
1915
+ name: 'delete_monitor_builds',
1916
+ description: 'Delete build history for a specific flow. Removes all stored build execution records to clean up old data and free storage space. Use cautiously as this permanently removes build history that may be useful for debugging.',
1917
+ inputSchema: {
1918
+ type: 'object',
1919
+ properties: {
1920
+ flow_id: {
1921
+ type: 'string',
1922
+ format: 'uuid',
1923
+ description: 'Flow ID (UUID) to delete build history for'
1924
+ }
1925
+ },
1926
+ required: ['flow_id']
1927
+ },
1928
+ annotations: {
1929
+ readOnlyHint: false,
1930
+ destructiveHint: true,
1931
+ idempotentHint: true,
1932
+ openWorldHint: true
1933
+ }
1934
+ },
1935
+ {
1936
+ name: 'delete_monitor_messages',
1937
+ description: 'Delete multiple messages by their IDs. Batch deletion of message records for cleanup, privacy compliance, or storage management. Permanently removes messages from the system.',
1938
+ inputSchema: {
1939
+ type: 'object',
1940
+ properties: {
1941
+ message_ids: {
1942
+ type: 'array',
1943
+ items: { type: 'string' },
1944
+ description: 'Array of message IDs (UUIDs) to delete'
1945
+ }
1946
+ },
1947
+ required: ['message_ids']
1948
+ },
1949
+ annotations: {
1950
+ readOnlyHint: false,
1951
+ destructiveHint: true,
1952
+ idempotentHint: true,
1953
+ openWorldHint: true
1954
+ }
1955
+ },
1956
+ {
1957
+ name: 'build_vertices',
1958
+ description: 'Get vertex build order for a flow. Retrieves the ordered list of vertex IDs representing the build execution sequence. Useful for understanding flow component dependencies, optimizing build performance, and debugging build order issues. Supports partial builds with start/stop component IDs.',
1959
+ inputSchema: {
1960
+ type: 'object',
1961
+ properties: {
1962
+ flow_id: {
1963
+ type: 'string',
1964
+ description: 'Flow ID (UUID) to retrieve vertex build order for'
1965
+ },
1966
+ data: {
1967
+ type: 'object',
1968
+ description: 'Optional flow data override for build'
1969
+ },
1970
+ stop_component_id: {
1971
+ type: 'string',
1972
+ description: 'Optional component ID to stop build at'
1973
+ },
1974
+ start_component_id: {
1975
+ type: 'string',
1976
+ description: 'Optional component ID to start build from'
1977
+ }
1978
+ },
1979
+ required: ['flow_id']
1980
+ },
1981
+ annotations: {
1982
+ readOnlyHint: false,
1983
+ destructiveHint: false,
1984
+ idempotentHint: true,
1985
+ openWorldHint: true
1986
+ }
1987
+ },
1988
+ {
1989
+ name: 'get_vertex',
1990
+ description: 'Get detailed information about a specific vertex (component) in a flow. Retrieves vertex configuration, state, and metadata. Essential for inspecting individual component details, debugging component issues, and understanding flow structure at the component level.',
1991
+ inputSchema: {
1992
+ type: 'object',
1993
+ properties: {
1994
+ flow_id: {
1995
+ type: 'string',
1996
+ format: 'uuid',
1997
+ description: 'Flow ID (UUID) containing the vertex'
1998
+ },
1999
+ vertex_id: {
2000
+ type: 'string',
2001
+ description: 'Vertex ID to retrieve details for'
2002
+ }
2003
+ },
2004
+ required: ['flow_id', 'vertex_id']
2005
+ },
2006
+ annotations: {
2007
+ readOnlyHint: true,
2008
+ destructiveHint: false,
2009
+ idempotentHint: true,
2010
+ openWorldHint: true
2011
+ }
2012
+ },
2013
+ {
2014
+ name: 'stream_vertex_build',
2015
+ description: 'Stream real-time build events for a specific vertex. Provides live updates during vertex build process using server-sent events (SSE). Essential for monitoring long-running component builds, debugging build failures in real-time, and providing live build status to users.',
2016
+ inputSchema: {
2017
+ type: 'object',
2018
+ properties: {
2019
+ flow_id: {
2020
+ type: 'string',
2021
+ description: 'Flow ID (UUID) containing the vertex'
2022
+ },
2023
+ vertex_id: {
2024
+ type: 'string',
2025
+ description: 'Vertex ID to stream build events for'
2026
+ }
2027
+ },
2028
+ required: ['flow_id', 'vertex_id']
2029
+ },
2030
+ annotations: {
2031
+ readOnlyHint: true,
2032
+ destructiveHint: false,
2033
+ idempotentHint: true,
2034
+ openWorldHint: true
2035
+ }
2036
+ },
2037
+ {
2038
+ name: 'get_version',
2039
+ description: 'Get Langflow API version information. Retrieves current API version number and related system information. Essential for compatibility checks, debugging version-specific issues, and ensuring client-server version alignment.',
2040
+ inputSchema: {
2041
+ type: 'object',
2042
+ properties: {}
2043
+ },
2044
+ annotations: {
2045
+ readOnlyHint: true,
2046
+ destructiveHint: false,
2047
+ idempotentHint: true,
2048
+ openWorldHint: true
2049
+ }
2050
+ },
2051
+ {
2052
+ name: 'list_users',
2053
+ description: 'List all users in the Langflow instance. Admin-only endpoint. Supports pagination with skip and limit parameters. Returns array of user objects with id, username, email, and other profile information.',
2054
+ inputSchema: {
2055
+ type: 'object',
2056
+ properties: {
2057
+ skip: {
2058
+ type: 'number',
2059
+ description: 'Number of users to skip (default: 0)'
2060
+ },
2061
+ limit: {
2062
+ type: 'number',
2063
+ description: 'Maximum number of users to return (default: 50, max: 100)'
2064
+ }
2065
+ }
2066
+ },
2067
+ annotations: {
2068
+ readOnlyHint: true,
2069
+ destructiveHint: false,
2070
+ idempotentHint: true,
2071
+ openWorldHint: true
2072
+ }
2073
+ },
2074
+ {
2075
+ name: 'get_current_user',
2076
+ description: 'Get information about the currently authenticated user. Returns user profile including id, username, email, is_active, is_superuser status, and profile image.',
2077
+ inputSchema: {
2078
+ type: 'object',
2079
+ properties: {}
2080
+ },
2081
+ annotations: {
2082
+ readOnlyHint: true,
2083
+ destructiveHint: false,
2084
+ idempotentHint: true,
2085
+ openWorldHint: true
2086
+ }
2087
+ },
2088
+ {
2089
+ name: 'get_user',
2090
+ description: 'Get details about a specific user by ID. Returns user profile information including username, email, active status, and profile picture.',
2091
+ inputSchema: {
2092
+ type: 'object',
2093
+ properties: {
2094
+ user_id: {
2095
+ type: 'string',
2096
+ format: 'uuid',
2097
+ description: 'User ID (UUID)'
2098
+ }
2099
+ },
2100
+ required: ['user_id']
2101
+ },
2102
+ annotations: {
2103
+ readOnlyHint: true,
2104
+ destructiveHint: false,
2105
+ idempotentHint: true,
2106
+ openWorldHint: true
2107
+ }
2108
+ },
2109
+ {
2110
+ name: 'update_user',
2111
+ description: 'Update user profile information. Can modify username, password, or profile image. Returns updated user object.',
2112
+ inputSchema: {
2113
+ type: 'object',
2114
+ properties: {
2115
+ user_id: {
2116
+ type: 'string',
2117
+ format: 'uuid',
2118
+ description: 'User ID (UUID) to update'
2119
+ },
2120
+ username: {
2121
+ type: 'string',
2122
+ description: 'New username'
2123
+ },
2124
+ password: {
2125
+ type: 'string',
2126
+ description: 'New password'
2127
+ },
2128
+ profile_image: {
2129
+ type: 'string',
2130
+ description: 'New profile image URL or path'
2131
+ }
2132
+ },
2133
+ required: ['user_id']
2134
+ },
2135
+ annotations: {
2136
+ readOnlyHint: false,
2137
+ destructiveHint: false,
2138
+ idempotentHint: true,
2139
+ openWorldHint: true
2140
+ }
2141
+ },
2142
+ {
2143
+ name: 'reset_user_password',
2144
+ description: 'Reset password for a specific user. Admin-only endpoint. Requires user ID and new password (minimum 8 characters). Returns updated user object.',
2145
+ inputSchema: {
2146
+ type: 'object',
2147
+ properties: {
2148
+ user_id: {
2149
+ type: 'string',
2150
+ format: 'uuid',
2151
+ description: 'User ID (UUID) to reset password for'
2152
+ },
2153
+ new_password: {
2154
+ type: 'string',
2155
+ description: 'New password (minimum 8 characters)'
2156
+ }
2157
+ },
2158
+ required: ['user_id', 'new_password']
2159
+ },
2160
+ annotations: {
2161
+ readOnlyHint: false,
2162
+ destructiveHint: false,
2163
+ idempotentHint: false,
2164
+ openWorldHint: true
2165
+ }
2166
+ },
2167
+ {
2168
+ name: 'list_api_keys',
2169
+ description: 'List all API keys for the authenticated user. Returns array of API key objects with id, name, created_at, last_used_at, total_uses, and is_active status.',
2170
+ inputSchema: {
2171
+ type: 'object',
2172
+ properties: {}
2173
+ },
2174
+ annotations: {
2175
+ readOnlyHint: true,
2176
+ destructiveHint: false,
2177
+ idempotentHint: true,
2178
+ openWorldHint: true
2179
+ }
2180
+ },
2181
+ {
2182
+ name: 'create_api_key',
2183
+ description: 'Create a new API key with a specified name. Returns the created API key object including the key value (only shown once).',
2184
+ inputSchema: {
2185
+ type: 'object',
2186
+ properties: {
2187
+ name: {
2188
+ type: 'string',
2189
+ description: 'Name/label for the API key'
2190
+ }
2191
+ },
2192
+ required: ['name']
2193
+ },
2194
+ annotations: {
2195
+ readOnlyHint: false,
2196
+ destructiveHint: false,
2197
+ idempotentHint: false,
2198
+ openWorldHint: true
2199
+ }
2200
+ },
2201
+ {
2202
+ name: 'delete_api_key',
2203
+ description: 'Delete a specific API key by ID. This action is permanent and cannot be undone. The API key will immediately stop working.',
2204
+ inputSchema: {
2205
+ type: 'object',
2206
+ properties: {
2207
+ api_key_id: {
2208
+ type: 'string',
2209
+ format: 'uuid',
2210
+ description: 'API key ID (UUID) to delete'
2211
+ }
2212
+ },
2213
+ required: ['api_key_id']
2214
+ },
2215
+ annotations: {
2216
+ readOnlyHint: false,
2217
+ destructiveHint: true,
2218
+ idempotentHint: true,
2219
+ openWorldHint: true
2220
+ }
2221
+ },
2222
+ {
2223
+ name: 'list_custom_components',
2224
+ description: 'List all custom components created by the user. Returns array of custom component objects with code, name, description, and return type.',
2225
+ inputSchema: {
2226
+ type: 'object',
2227
+ properties: {}
2228
+ },
2229
+ annotations: {
2230
+ readOnlyHint: true,
2231
+ destructiveHint: false,
2232
+ idempotentHint: true,
2233
+ openWorldHint: true
2234
+ }
2235
+ },
2236
+ {
2237
+ name: 'create_custom_component',
2238
+ description: 'Create a new custom component with Python code. Requires component code, name, and optional description and return_type. Returns created component object.',
2239
+ inputSchema: {
2240
+ type: 'object',
2241
+ properties: {
2242
+ code: {
2243
+ type: 'string',
2244
+ description: 'Python code for the custom component'
2245
+ },
2246
+ name: {
2247
+ type: 'string',
2248
+ description: 'Component name'
2249
+ },
2250
+ description: {
2251
+ type: 'string',
2252
+ description: 'Optional component description'
2253
+ },
2254
+ return_type: {
2255
+ type: 'string',
2256
+ description: 'Optional return type specification'
2257
+ }
2258
+ },
2259
+ required: ['code', 'name']
2260
+ },
2261
+ annotations: {
2262
+ readOnlyHint: false,
2263
+ destructiveHint: false,
2264
+ idempotentHint: false,
2265
+ openWorldHint: true
2266
+ }
2267
+ },
2268
+ {
2269
+ name: 'login',
2270
+ description: 'Authenticate with username and password. Returns access token, optional refresh token, and token type. Use the access token in subsequent API requests.',
2271
+ inputSchema: {
2272
+ type: 'object',
2273
+ properties: {
2274
+ username: {
2275
+ type: 'string',
2276
+ description: 'Username for authentication'
2277
+ },
2278
+ password: {
2279
+ type: 'string',
2280
+ description: 'Password for authentication'
2281
+ }
2282
+ },
2283
+ required: ['username', 'password']
2284
+ },
2285
+ annotations: {
2286
+ readOnlyHint: false,
2287
+ destructiveHint: false,
2288
+ idempotentHint: false,
2289
+ openWorldHint: true
2290
+ }
2291
+ },
2292
+ {
2293
+ name: 'auto_login',
2294
+ description: 'Automatically login with stored credentials or session. Returns access token if auto-login is configured and enabled.',
2295
+ inputSchema: {
2296
+ type: 'object',
2297
+ properties: {}
2298
+ },
2299
+ annotations: {
2300
+ readOnlyHint: false,
2301
+ destructiveHint: false,
2302
+ idempotentHint: false,
2303
+ openWorldHint: true
2304
+ }
2305
+ },
2306
+ {
2307
+ name: 'refresh_token',
2308
+ description: 'Refresh authentication token using refresh token. Returns new access token and optionally a new refresh token.',
2309
+ inputSchema: {
2310
+ type: 'object',
2311
+ properties: {}
2312
+ },
2313
+ annotations: {
2314
+ readOnlyHint: false,
2315
+ destructiveHint: false,
2316
+ idempotentHint: false,
2317
+ openWorldHint: true
2318
+ }
2319
+ },
2320
+ {
2321
+ name: 'logout',
2322
+ description: 'Logout and invalidate current authentication session. Clears authentication tokens and terminates the session.',
2323
+ inputSchema: {
2324
+ type: 'object',
2325
+ properties: {}
2326
+ },
2327
+ annotations: {
2328
+ readOnlyHint: false,
2329
+ destructiveHint: false,
2330
+ idempotentHint: true,
2331
+ openWorldHint: true
2332
+ }
2333
+ },
2334
+ {
2335
+ name: 'get_public_flow',
2336
+ description: 'Get a public flow by ID without authentication. Public flows can be accessed by anyone without API key or login credentials.',
2337
+ inputSchema: {
2338
+ type: 'object',
2339
+ properties: {
2340
+ flow_id: {
2341
+ type: 'string',
2342
+ description: 'Flow ID (UUID) of the public flow'
2343
+ }
2344
+ },
2345
+ required: ['flow_id']
2346
+ },
2347
+ annotations: {
2348
+ readOnlyHint: true,
2349
+ destructiveHint: false,
2350
+ idempotentHint: true,
2351
+ openWorldHint: true
2352
+ }
2353
+ },
2354
+ {
2355
+ name: 'batch_create_flows',
2356
+ description: 'Create multiple flows in a single batch operation. More efficient than creating flows individually. Accepts array of flow objects.',
2357
+ inputSchema: {
2358
+ type: 'object',
2359
+ properties: {
2360
+ flows: {
2361
+ type: 'array',
2362
+ description: 'Array of flow objects to create',
2363
+ items: {
2364
+ type: 'object',
2365
+ properties: {
2366
+ name: {
2367
+ type: 'string',
2368
+ description: 'Flow name'
2369
+ },
2370
+ description: {
2371
+ type: 'string',
2372
+ description: 'Optional flow description'
2373
+ },
2374
+ data: {
2375
+ type: 'object',
2376
+ description: 'Optional flow data/configuration'
2377
+ },
2378
+ folder_id: {
2379
+ type: 'string',
2380
+ description: 'Optional folder ID to organize the flow'
2381
+ }
2382
+ }
2383
+ }
2384
+ }
2385
+ },
2386
+ required: ['flows']
2387
+ },
2388
+ annotations: {
2389
+ readOnlyHint: false,
2390
+ destructiveHint: false,
2391
+ idempotentHint: false,
2392
+ openWorldHint: true
2393
+ }
2394
+ },
2395
+ {
2396
+ name: 'get_task_status',
2397
+ description: 'Get status of an asynchronous task by task ID. Returns task status (pending, running, completed, failed), result if completed, or error if failed.',
2398
+ inputSchema: {
2399
+ type: 'object',
2400
+ properties: {
2401
+ task_id: {
2402
+ type: 'string',
2403
+ description: 'Task ID to check status for'
2404
+ }
2405
+ },
2406
+ required: ['task_id']
2407
+ },
2408
+ annotations: {
2409
+ readOnlyHint: true,
2410
+ destructiveHint: false,
2411
+ idempotentHint: true,
2412
+ openWorldHint: true
2413
+ }
2414
+ },
2415
+ {
2416
+ name: 'download_folder',
2417
+ description: 'Download entire folder as compressed archive. Returns archive file containing all flows and resources in the folder.',
2418
+ inputSchema: {
2419
+ type: 'object',
2420
+ properties: {
2421
+ folder_id: {
2422
+ type: 'string',
2423
+ description: 'Folder ID (UUID) to download'
2424
+ }
2425
+ },
2426
+ required: ['folder_id']
2427
+ },
2428
+ annotations: {
2429
+ readOnlyHint: true,
2430
+ destructiveHint: false,
2431
+ idempotentHint: true,
2432
+ openWorldHint: true
2433
+ }
2434
+ },
2435
+ {
2436
+ name: 'upload_folder',
2437
+ description: 'Upload folder from compressed archive. Provide base64-encoded file content and filename. Creates folder structure and imports all flows.',
2438
+ inputSchema: {
2439
+ type: 'object',
2440
+ properties: {
2441
+ file_content: {
2442
+ type: 'string',
2443
+ description: 'Base64-encoded archive file content'
2444
+ },
2445
+ file_name: {
2446
+ type: 'string',
2447
+ description: 'Archive filename'
2448
+ }
2449
+ },
2450
+ required: ['file_content', 'file_name']
2451
+ },
2452
+ annotations: {
2453
+ readOnlyHint: false,
2454
+ destructiveHint: false,
2455
+ idempotentHint: false,
2456
+ openWorldHint: true
2457
+ }
2458
+ },
2459
+ {
2460
+ name: 'list_starter_projects',
2461
+ description: 'List available starter project templates. Returns array of pre-built project templates that can be used to quickly bootstrap new Langflow projects.',
2462
+ inputSchema: {
2463
+ type: 'object',
2464
+ properties: {}
2465
+ },
2466
+ annotations: {
2467
+ readOnlyHint: true,
2468
+ destructiveHint: false,
2469
+ idempotentHint: true,
2470
+ openWorldHint: true
2471
+ }
2472
+ },
2473
+ {
2474
+ name: 'upload_knowledge_base',
2475
+ description: 'Upload file to create or update a knowledge base for RAG. Provide knowledge base name, base64-encoded file content, and filename.',
2476
+ inputSchema: {
2477
+ type: 'object',
2478
+ properties: {
2479
+ kb_name: {
2480
+ type: 'string',
2481
+ description: 'Knowledge base name/identifier'
2482
+ },
2483
+ file_content: {
2484
+ type: 'string',
2485
+ description: 'Base64-encoded file content'
2486
+ },
2487
+ file_name: {
2488
+ type: 'string',
2489
+ description: 'Name of the file being uploaded'
2490
+ }
2491
+ },
2492
+ required: ['kb_name', 'file_content', 'file_name']
2493
+ },
2494
+ annotations: {
2495
+ readOnlyHint: false,
2496
+ destructiveHint: false,
2497
+ idempotentHint: false,
2498
+ openWorldHint: true
2499
+ }
2500
+ },
2501
+ {
2502
+ name: 'list_elevenlabs_voices',
2503
+ description: 'List available ElevenLabs text-to-speech voices. Returns array of voice objects with voice_id and name for use in voice synthesis flows.',
2504
+ inputSchema: {
2505
+ type: 'object',
2506
+ properties: {}
2507
+ },
2508
+ annotations: {
2509
+ readOnlyHint: true,
2510
+ destructiveHint: false,
2511
+ idempotentHint: true,
2512
+ openWorldHint: true
2513
+ }
2514
+ },
2515
+ {
2516
+ name: 'health_check',
2517
+ description: 'Check Langflow instance health status. Returns health status and system information. Use to verify the API is accessible and operational.',
2518
+ inputSchema: {
2519
+ type: 'object',
2520
+ properties: {}
2521
+ },
2522
+ annotations: {
2523
+ readOnlyHint: true,
2524
+ destructiveHint: false,
2525
+ idempotentHint: true,
2526
+ openWorldHint: true
2527
+ }
2528
+ },
2529
+ {
2530
+ name: 'get_logs',
2531
+ description: 'Retrieve system logs. Supports both regular and streaming modes. Use stream parameter to enable real-time log streaming.',
2532
+ inputSchema: {
2533
+ type: 'object',
2534
+ properties: {
2535
+ stream: {
2536
+ type: 'boolean',
2537
+ description: 'Enable streaming mode for real-time logs (default: false)'
2538
+ }
2539
+ }
2540
+ },
2541
+ annotations: {
2542
+ readOnlyHint: true,
2543
+ destructiveHint: false,
2544
+ idempotentHint: true,
2545
+ openWorldHint: true
685
2546
  }
686
2547
  }
687
2548
  ];