Skip to main content
Glama

set_week_theme

Configure daily work themes to guide task selection throughout the week, helping users maintain focus on specific types of work each day.

Instructions

Configure work themes for each day of the week.

Sets which type of work to focus on each day (e.g., "Fridays = strategic work"). This influences task selection in start_my_day().

Args: week_start_date_str: Monday date in YYYY-MM-DD format themes_json: JSON object with day themes, e.g.: {"monday": "sprint_work", "friday": "strategic"} focus_todo_ids: Optional comma-separated todo IDs to focus on this week

Returns: Confirmation message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
week_start_date_strYes
themes_jsonYes
focus_todo_idsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `set_week_theme` tool is registered using the `@mcp.tool()` decorator and its handler implementation directly follows in `src/coach_ai/server.py`. It takes a start date, a JSON string of themes, and optional focus IDs, validating the inputs and storing the configuration in the `week_themes` database table.
    @mcp.tool()
    async def set_week_theme(
        week_start_date_str: str,
        themes_json: str,
        focus_todo_ids: Optional[str] = None,
    ) -> str:
        """Configure work themes for each day of the week.
    
        Sets which type of work to focus on each day (e.g., "Fridays = strategic work").
        This influences task selection in start_my_day().
    
        Args:
            week_start_date_str: Monday date in YYYY-MM-DD format
            themes_json: JSON object with day themes, e.g.:
                {"monday": "sprint_work", "friday": "strategic"}
            focus_todo_ids: Optional comma-separated todo IDs to focus on this week
    
        Returns:
            Confirmation message
        """
        db = await storage.get_db()
    
        try:
            week_start = datetime.fromisoformat(week_start_date_str).date()
        except ValueError:
            return f"Error: Invalid date format. Use YYYY-MM-DD"
    
        # Verify it's a Monday
        if week_start.weekday() != 0:
            return f"Error: Date must be a Monday. {week_start} is a {week_start.strftime('%A')}"
    
        try:
            themes = json.loads(themes_json)
        except json.JSONDecodeError as e:
            return f"Error: Invalid JSON for themes: {e}"
    
        # Validate theme values
        valid_themes = ["sprint_work", "strategic", "admin", "learning", "mixed"]
        for day, theme in themes.items():
            if theme not in valid_themes:
                return f"Error: Invalid theme '{theme}'. Must be one of: {', '.join(valid_themes)}"
    
        # Store in database
        await db.execute(
            """
            INSERT OR REPLACE INTO week_themes (week_start_date, theme_json, focus_items)
            VALUES (?, ?, ?)
            """,
            (week_start, json.dumps(themes), focus_todo_ids or ""),
        )
        await db.commit()
    
        response = f"✓ Set weekly themes for week of {week_start.strftime('%B %d, %Y')}:\n"
        for day, theme in themes.items():
            response += f"  {day.capitalize()}: {theme}\n"
    
        if focus_todo_ids:
            response += f"\nFocus items: {focus_todo_ids}"
    
        return response
Behavior3/5

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

No annotations are provided, so the description carries the full disclosure burden. It mentions the return value ('Confirmation message'), but fails to clarify critical behavioral traits like whether this operation overwrites existing weekly themes, merges with them, or validates the Monday date constraint beyond the parameter description.

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 is well-structured with clear Purpose-Args-Returns sections. While the docstring format is slightly more verbose than pure prose, it efficiently packs necessary parameter documentation without redundant language. Front-loading is effective with the main purpose in the first sentence.

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?

Given the tool has 3 parameters, no annotations, and an output schema, the description successfully covers the purpose, all parameters with examples, and the return type. The only gap preventing a 5 is the lack of behavioral context regarding side effects or persistence semantics.

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?

With 0% schema description coverage, the description fully compensates by documenting all three parameters in the Args section: it specifies formats (YYYY-MM-DD, JSON object, comma-separated), provides concrete examples for themes_json, and notes optionality for focus_todo_ids.

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 opens with specific action verbs ('Configure', 'Sets') and clearly identifies the resource (work themes for days of the week). It effectively distinguishes itself from sibling tools by explicitly stating it 'influences task selection in start_my_day()', establishing a clear functional relationship.

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

Usage Guidelines4/5

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

Provides clear context by linking the tool's output to 'start_my_day()' consumption, helping the agent understand the workflow relationship. However, it lacks explicit temporal guidance (e.g., 'use at the beginning of the week') or exclusions (when not to use it).

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