langflow-mcp-server 1.1.1 → 1.2.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/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,12 @@ 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
685
1328
  }
686
1329
  }
687
1330
  ];