parse_task_list
Convert natural language task lists into structured todos with priority, timeframe, and energy levels for previewing before creation in Coach AI.
Instructions
Parse natural language task list into structured todos (does NOT create them).
Use this to preview what will be created before committing. Then use add_todo(todos_batch=...) to create them.
Or use brain_dump_tasks() for a one-step workflow.
Supports multiple formats:
Bullet points: "- Task 1"
Numbered lists: "1. Task 2"
Checkboxes: "[ ] Task 3"
Section headers: "Sprint work:\n- Task 4"
Smart extraction:
Priority: "#high", "URGENT:", "!!"
Timeframe: "this week", "(this month)", "someday"
Time: "(30min)", "~2h"
Energy: "[high energy]", "[low effort]"
Theme: "#sprint", "@admin"
Args: text: Natural language task list default_priority: Default priority for tasks default_timeframe: Default timeframe for tasks
Returns: JSON string of parsed todos
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| default_priority | No | medium | |
| default_timeframe | No |
Implementation Reference
- src/coach_ai/server.py:166-216 (handler)The parse_task_list tool is implemented as an async function in server.py, decorated with @mcp.tool(). It uses the parse_natural_language_task_list helper function to parse the text.
@mcp.tool() async def parse_task_list( text: str, default_priority: str = "medium", default_timeframe: Optional[str] = None, ) -> str: """Parse natural language task list into structured todos (does NOT create them). Use this to preview what will be created before committing. Then use add_todo(todos_batch=...) to create them. Or use brain_dump_tasks() for a one-step workflow. Supports multiple formats: - Bullet points: "- Task 1" - Numbered lists: "1. Task 2" - Checkboxes: "[ ] Task 3" - Section headers: "Sprint work:\\n- Task 4" Smart extraction: - Priority: "#high", "URGENT:", "!!" - Timeframe: "this week", "(this month)", "someday" - Time: "(30min)", "~2h" - Energy: "[high energy]", "[low effort]" - Theme: "#sprint", "@admin" Args: text: Natural language task list default_priority: Default priority for tasks default_timeframe: Default timeframe for tasks Returns: JSON string of parsed todos """ result = parse_natural_language_task_list(text, default_priority, default_timeframe) response = f"{result['parse_summary']}\n\n" if result['parsed_todos']: response += "Parsed todos (ready for add_todo batch mode):\n" response += json.dumps(result['parsed_todos'], indent=2) if result['unparseable_lines']: response += "\n\nCould not parse:\n" for line in result['unparseable_lines']: response += f" - {line}\n" response += f"\n\nTo create these todos, use: add_todo(todos_batch='{json.dumps(result['parsed_todos'])}')" return response