Skip to main content
Glama

add_task_context

Add context notes to tasks to track progress, reasons, blockers, or links. Helps maintain task clarity and continuity in productivity systems.

Instructions

Add context note to task (where left off, why doing it, etc).

Args: todo_id: ID of the todo context: Context note to add context_type: Type of context (progress, why, blocker, link)

Returns: Confirmation message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
todo_idYes
contextYes
context_typeNoprogress

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The implementation of the 'add_task_context' tool, which updates the task_context column in the database with a timestamped note.
    async def add_task_context(
        todo_id: int,
        context: str,
        context_type: str = "progress",
    ) -> str:
        """Add context note to task (where left off, why doing it, etc).
    
        Args:
            todo_id: ID of the todo
            context: Context note to add
            context_type: Type of context (progress, why, blocker, link)
    
        Returns:
            Confirmation message
        """
        db = await storage.get_db()
    
        # Get todo
        cursor = await db.execute("SELECT title FROM todos WHERE id = ?", (todo_id,))
        row = await cursor.fetchone()
        if not row:
            return f"Error: Todo #{todo_id} not found"
    
        # Add timestamped context
        context_note = f"[{datetime.now().isoformat()}] [{context_type}] {context}"
    
        await db.execute(
            """
            UPDATE todos
            SET task_context = COALESCE(task_context || '\\n' || ?, ?)
            WHERE id = ?
            """,
            (context_note, context_note, todo_id),
        )
        await db.commit()
    
        return f"✓ Added {context_type} context to #{todo_id} '{row['title']}'"
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the return value ('Confirmation message') but fails to specify critical mutation details: whether this appends to existing context or overwrites, whether multiple context entries accumulate, or if the operation is idempotent. The word 'Add' implies non-destructive creation but lacks specificity.

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

Conciseness4/5

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

The description uses a structured Args/Returns format that efficiently organizes information. The lead sentence establishes purpose immediately, and the parenthetical examples add value without verbosity. No redundant or filler text is present.

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

Completeness3/5

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

For a three-parameter tool with simple scalar types, the description is adequate but not comprehensive. It compensates for zero schema coverage and acknowledges output existence, but gaps remain regarding behavioral nuances (accumulation vs. replacement of context notes) and interaction patterns with the task lifecycle.

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

Parameters4/5

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

Given 0% schema description coverage, the description effectively compensates by documenting all three parameters. Notably, it specifies the enumerated values for context_type ('progress, why, blocker, link') which the schema omits (declaring only type: string). This provides essential semantic constraints missing from the structured schema.

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

Purpose4/5

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

The description clearly states the action ('Add context note to task') and provides concrete examples in parentheses ('where left off, why doing it, etc.') that distinguish this from simply updating task metadata. It differentiates from siblings like add_todo or complete_todo by specifying 'context note' as the resource being manipulated.

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?

The parenthetical examples imply usage scenarios (tracking progress, rationale), but there is no explicit guidance on when to use this versus alternatives like add_daily_note_section or write_daily_note_section. No 'when-not-to-use' or prerequisite conditions are specified.

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