Skip to main content
Glama

set_todo_timeframe

Assign a timeframe to tasks for better planning and prioritization, using options like this week, next sprint, or this quarter to organize your schedule.

Instructions

Assign temporal timeframe to a todo.

Args: todo_id: ID of the todo timeframe: One of: this_week, next_sprint, this_month, this_quarter, someday reason: Optional reason for this timeframe

Returns: Confirmation message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
todo_idYes
timeframeYes
reasonNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The function 'set_todo_timeframe' handles the assignment of a timeframe to a todo item in the database, including validation and optional note addition to task_context.
    async def set_todo_timeframe(
        todo_id: int,
        timeframe: str,
        reason: Optional[str] = None,
    ) -> str:
        """Assign temporal timeframe to a todo.
    
        Args:
            todo_id: ID of the todo
            timeframe: One of: this_week, next_sprint, this_month, this_quarter, someday
            reason: Optional reason for this timeframe
    
        Returns:
            Confirmation message
        """
        db = await storage.get_db()
    
        # Validate timeframe
        valid_timeframes = ["this_week", "next_sprint", "this_month", "this_quarter", "someday"]
        if timeframe not in valid_timeframes:
            return f"Error: Invalid timeframe. Must be one of: {', '.join(valid_timeframes)}"
    
        # 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"
    
        # Update timeframe
        await db.execute(
            "UPDATE todos SET timeframe = ? WHERE id = ?",
            (timeframe, todo_id),
        )
    
        # Optionally add reason to task_context
        if reason:
            context_note = f"[{datetime.now().isoformat()}] Timeframe set to {timeframe}: {reason}"
            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"✓ Set timeframe for #{todo_id} '{row['title']}' to: {timeframe}"
  • The 'set_todo_timeframe' tool is registered using the '@mcp.tool()' decorator.
    @mcp.tool()
Behavior3/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 documents the return value ('Confirmation message') and crucially enumerates valid timeframe values (this_week, next_sprint, etc.) that the schema lacks as enums. However, it omits mutation details (overwrite behavior), error handling for invalid todo_ids, and side effects.

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 docstring format with clear Args and Returns sections. The opening sentence is concise and specific. Every sentence serves a purpose given the lack of schema annotations, though the Returns section may be redundant if an output schema exists.

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 tool with zero schema description coverage and no annotations, the description adequately covers parameter semantics and valid values. However, given the presence of sibling batch operations and the potential for errors (invalid todo_id, invalid timeframe), the description lacks completeness regarding error states and operational constraints.

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 compensates effectively by documenting all three parameters. Most critically, it provides the enumerated valid values for the 'timeframe' parameter that the schema only types as 'string', preventing invocation errors. The todo_id and reason descriptions are minimal but sufficient.

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 tool assigns a temporal timeframe to a todo using the specific verb 'Assign'. While it doesn't explicitly name sibling alternatives like batch_assign_timeframes, the singular 'todo' and specific verb distinguish it from batch operations and creation tools.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives such as batch_assign_timeframes, or whether to set timeframe during initial todo creation with add_todo versus using this update operation. No prerequisites or constraints are mentioned.

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