project_list
Retrieve all Taskwarrior projects to organize tasks by category and track work across different initiatives.
Instructions
List all projects in Taskwarrior
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/taskwarrior.ts:105-115 (handler)The core implementation of listing Taskwarrior projects.
export async function listProjects(): Promise<string[]> { try { const output = await runCommand('task', ['projects']); return output .split('\n') .map((p) => p.trim()) .filter((p) => p.length > 0); } catch (err) { throw new Error(`Failed to list projects: ${(err as Error).message}`); } } - src/index.ts:79-86 (registration)Registration of the 'project_list' MCP tool.
server.tool('project_list', 'List all projects in Taskwarrior', {}, async () => { try { const projects = await listProjects(); return { content: [{ type: 'text', text: JSON.stringify(projects, null, 2) }] }; } catch (err) { return { content: [{ type: 'text', text: (err as Error).message }], isError: true }; } });