list_tasks
Parse and display tasks from a Devpipe config.toml file, showing task IDs, names, types, commands, and enabled status to help users manage their pipeline configuration.
Instructions
Parse and list all tasks from a devpipe config.toml file. Shows task IDs, names, types, commands, and enabled status.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config | No | Path to config.toml file. If not provided, searches for config.toml in current directory and parent directories. |
Implementation Reference
- src/index.ts:338-359 (handler)The main execution handler for the 'list_tasks' tool. Locates and parses the devpipe config.toml, extracts tasks using listTasksFromConfig helper, and returns JSON with config path, task count, and task details.case 'list_tasks': { const configPath = args?.config || await findConfigFile(); if (!configPath) { throw new Error('No config.toml file found. Please specify a config path or ensure config.toml exists in the current directory or parent directories.'); } const config = await parseConfig(configPath); const tasks = listTasksFromConfig(config); return { content: [ { type: 'text', text: JSON.stringify({ configPath, taskCount: tasks.length, tasks, }, null, 2), }, ], }; }
- src/index.ts:69-79 (schema)Input schema definition for the 'list_tasks' tool, specifying optional config path parameter.name: 'list_tasks', description: 'Parse and list all tasks from a devpipe config.toml file. Shows task IDs, names, types, commands, and enabled status.', inputSchema: { type: 'object', properties: { config: { type: 'string', description: 'Path to config.toml file. If not provided, searches for config.toml in current directory and parent directories.', }, }, },
- src/index.ts:68-80 (registration)Tool registration entry in the ListToolsRequestSchema handler, defining name, description, and input schema for 'list_tasks'.{ name: 'list_tasks', description: 'Parse and list all tasks from a devpipe config.toml file. Shows task IDs, names, types, commands, and enabled status.', inputSchema: { type: 'object', properties: { config: { type: 'string', description: 'Path to config.toml file. If not provided, searches for config.toml in current directory and parent directories.', }, }, }, },
- src/utils.ts:238-264 (helper)Core helper function that implements the task extraction logic from DevpipeConfig. Iterates over config.tasks, constructs task objects with id, name, description, type, command, enabled status, and phase header flag.export function listTasksFromConfig(config: DevpipeConfig): Array<{ id: string; name: string; description: string; type: string; command: string; enabled: boolean; isPhaseHeader: boolean; }> { const tasks = []; for (const [taskId, task] of Object.entries(config.tasks)) { const isPhaseHeader = taskId.startsWith('phase-'); tasks.push({ id: taskId, name: task.name || taskId, description: task.desc || '', type: task.type || 'check', command: task.command || '', enabled: task.enabled !== false, isPhaseHeader }); } return tasks; }