Skip to main content
Glama

add_todo

Add tasks with temporal planning and context fields for better organization. Supports single tasks or batch imports with auto-categorization of time estimates, energy levels, and work types.

Instructions

Add todo(s) with enhanced temporal and context fields.

SINGLE MODE: Provide title and optional parameters BATCH MODE: Provide todos_batch as JSON string

New fields for temporal planning:

  • timeframe: When to work on task (this_week, next_sprint, this_month, this_quarter, someday)

  • energy_required: Energy level needed (high, medium, low)

  • theme_tag: Type of work (sprint_work, strategic, admin, learning)

  • linked_goal_id: Link to a goal

  • blocked_by: What's blocking this task

Auto-categorization (both modes):

  • Theme tags from keywords (sprint/strategic/admin/learning)

  • Time estimates from notes ("30min", "2h")

  • Quick win detection (<= 30min)

  • Timeframe suggestions from keywords + priority

  • Energy level suggestions from keywords

Batch mode example (JSON string):

[
    {"title": "Smoke test GPU endpoints", "priority": "high", "timeframe": "this_week"},
    {"title": "Review platform architecture", "priority": "medium"},
    {"title": "Update ADO board", "quick": true}
]

Args: title: Task title (required for single mode) priority: Priority level - 'low', 'medium', or 'high' notes: Additional notes or context quick: Mark as quick win timeframe: When to do this (this_week, next_sprint, this_month, this_quarter, someday) energy_required: Energy level (high, medium, low) theme_tag: Work type (sprint_work, strategic, admin, learning) linked_goal_id: ID of related goal blocked_by: What's blocking this todos_batch: JSON string of todos for batch mode

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNo
priorityNomedium
notesNo
quickNo
timeframeNo
energy_requiredNomedium
theme_tagNo
linked_goal_idNo
blocked_byNo
todos_batchNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The 'add_todo' tool implementation in 'src/coach_ai/server.py'. It handles single todo creation and batch todo processing by calling 'add_todos_batch'.
    async def add_todo(
        title: Optional[str] = None,
        priority: str = "medium",
        notes: str = "",
        quick: bool = False,
        timeframe: Optional[str] = None,
        energy_required: str = "medium",
        theme_tag: Optional[str] = None,
        linked_goal_id: Optional[int] = None,
        blocked_by: Optional[str] = None,
        todos_batch: Optional[str] = None,
    ) -> str:
        """Add todo(s) with enhanced temporal and context fields.
    
        SINGLE MODE: Provide title and optional parameters
        BATCH MODE: Provide todos_batch as JSON string
    
        New fields for temporal planning:
        - timeframe: When to work on task (this_week, next_sprint, this_month, this_quarter, someday)
        - energy_required: Energy level needed (high, medium, low)
        - theme_tag: Type of work (sprint_work, strategic, admin, learning)
        - linked_goal_id: Link to a goal
        - blocked_by: What's blocking this task
    
        Auto-categorization (both modes):
        - Theme tags from keywords (sprint/strategic/admin/learning)
        - Time estimates from notes ("30min", "2h")
        - Quick win detection (<= 30min)
        - Timeframe suggestions from keywords + priority
        - Energy level suggestions from keywords
    
        Batch mode example (JSON string):
        ```
        [
            {"title": "Smoke test GPU endpoints", "priority": "high", "timeframe": "this_week"},
            {"title": "Review platform architecture", "priority": "medium"},
            {"title": "Update ADO board", "quick": true}
        ]
        ```
    
        Args:
            title: Task title (required for single mode)
            priority: Priority level - 'low', 'medium', or 'high'
            notes: Additional notes or context
            quick: Mark as quick win
            timeframe: When to do this (this_week, next_sprint, this_month, this_quarter, someday)
            energy_required: Energy level (high, medium, low)
            theme_tag: Work type (sprint_work, strategic, admin, learning)
            linked_goal_id: ID of related goal
            blocked_by: What's blocking this
            todos_batch: JSON string of todos for batch mode
        """
        db = await storage.get_db()
    
        # BATCH MODE
        if todos_batch:
            try:
                batch_list = json.loads(todos_batch)
                result = await add_todos_batch(batch_list, db, auto_categorize=True)
    
                response = f"✓ Created {result['created_count']} todos\n"
                if result['suggestions']:
                    response += "\nAuto-categorization:\n"
                    for suggestion in result['suggestions'][:5]:  # Limit to 5
                        response += f"  • {suggestion}\n"
                return response
            except json.JSONDecodeError as e:
                return f"Error: Invalid JSON in todos_batch: {e}"
    
        # SINGLE MODE
        if not title:
            return "Error: Either 'title' or 'todos_batch' must be provided"
    
        todo_data = {
            "title": title,
            "priority": priority,
            "notes": notes,
            "quick": quick,
            "timeframe": timeframe,
            "energy_required": energy_required,
            "theme_tag": theme_tag,
            "linked_goal_id": linked_goal_id,
            "blocked_by": blocked_by,
        }
    
        result = await add_todos_batch([todo_data], db, auto_categorize=True)
        created_todo = result["created_todos"][0]
    
        response = f"✓ Added todo #{created_todo['id']}: {title}\n"
        response += f"  Priority: {created_todo['priority']}"
    
        if created_todo.get('timeframe'):
            response += f" | Timeframe: {created_todo['timeframe']}"
        if created_todo.get('time_estimate'):
            response += f" | Time: {created_todo['time_estimate']}min"
        if created_todo.get('quick'):
            response += " | Quick win"
    
        if result['suggestions']:
            response += f"\n  Auto-categorized: {', '.join(result['suggestions'])}"
    
        if created_todo.get('time_estimate') and created_todo['time_estimate'] > 120:
            response += f"\n  💡 Large task ({created_todo['time_estimate']}min). Consider using break_down_task() to split it."
    
        return response
  • The 'add_todo' tool is registered using the @mcp.tool() decorator in 'src/coach_ai/server.py'.
    @mcp.tool()
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden and effectively discloses auto-categorization behaviors (theme detection from keywords, time extraction from notes, quick win detection). However, it omits transactional details like idempotency or error handling behaviors.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear sections, but contains significant redundancy between the 'New fields' bullet section and the 'Args' parameter definitions. The auto-categorization list could also be more compact.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Thoroughly covers both single and batch input modes for the 10-parameter tool. Given the existence of an output schema (per context signals), the description appropriately focuses on input semantics, though it could briefly mention validation constraints.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% (no parameter descriptions in schema), but the Args section comprehensively documents all 10 parameters including valid enum values for timeframe, energy_required, and theme_tag, fully compensating for the schema gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Add todo(s)' with specific resource identification and distinguishes from siblings like complete_todo or delete_todo by emphasizing 'enhanced temporal and context fields' and structured data entry.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clearly delineates internal usage patterns (SINGLE MODE vs BATCH MODE) with specific parameter requirements for each, but fails to differentiate from sibling alternatives like brain_dump_tasks or parse_task_list which also handle task creation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/94aharris/coach-ai'

If you have feedback or need assistance with the MCP directory API, please join our Discord server