deployed
List all workflows in an n8n instance, replacing the n8n list:workflow command for workflow management and deployment.
Instructions
List all workflows in n8n instance - replaces "n8n list:workflow" command
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"type": "object"
}
Implementation Reference
- src/n8n/manager.ts:835-900 (handler)Core implementation of the 'deployed' tool: executes 'n8n list:workflow --all', parses output to list workflows with IDs, names, and active status, formats markdown responseasync listDeployedWorkflows(): Promise<any> { try { const command = 'n8n list:workflow --all'; console.error(`Executing: ${command}`); const { stdout, stderr } = await execAsync(command); if (this.hasRealError(stderr, stdout)) { throw new Error(stderr); } // Parse the output - format is "id|name" const lines = stdout.split('\n').filter(line => line.trim() && !line.includes('deprecation')); const workflows = []; // Get active workflow IDs for status let activeIds: string[] = []; try { const activeCommand = 'n8n list:workflow --active=true --onlyId'; const { stdout: activeStdout } = await execAsync(activeCommand); activeIds = activeStdout.split('\n').filter(id => id.trim()).map(id => id.trim()); } catch { // If we can't get active status, continue without it } for (const line of lines) { // Skip warning lines if (line.includes('There are deprecations') || line.includes('DB_SQLITE') || line.includes('N8N_RUNNERS')) { continue; } // Parse n8n list output format: id|name const parts = line.split('|'); if (parts.length >= 2) { const id = parts[0].trim(); workflows.push({ id: id, name: parts[1].trim(), status: activeIds.includes(id) ? 'active' : 'inactive', }); } } let output = `📋 Deployed Workflows (${workflows.length}):\n\n`; if (workflows.length === 0) { output += 'No workflows found in n8n instance.\n'; } else { for (const wf of workflows) { const statusIcon = wf.status === 'active' ? '🟢' : '⚪'; output += `${statusIcon} [${wf.id}] ${wf.name}\n`; } } return { content: [ { type: 'text', text: output, }, ], }; } catch (error: any) { throw new Error(`Failed to list workflows: ${error.message}`); } }
- src/tools/handler.ts:162-164 (handler)ToolHandler switch case that routes 'deployed' tool calls to N8nManager.listDeployedWorkflows()case 'deployed': return await this.n8nManager.listDeployedWorkflows();
- src/tools/registry.ts:289-296 (schema)Tool definition including name, description, and empty input schema for the 'deployed' tool{ name: 'deployed', description: 'List all workflows in n8n instance - replaces "n8n list:workflow" command', inputSchema: { type: 'object', properties: {}, }, },