set_goal
Define and track personal objectives with specific timeframes and categories to organize progress and maintain focus on productivity goals.
Instructions
Set a new goal.
Args: goal: The goal description timeframe: When you want to achieve this (e.g., 'this week', 'this month', 'long-term') category: Category of the goal (e.g., 'career', 'health', 'personal', 'general')
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | Yes | ||
| timeframe | Yes | ||
| category | No | general |
Implementation Reference
- src/coach_ai/storage.py:267-286 (handler)The actual implementation of the set_goal tool logic which interacts with the database.
async def set_goal(goal: str, timeframe: str, category: str = "general") -> str: """Set a new goal. Args: goal: The goal description timeframe: When you want to achieve this category: Category of the goal Returns: Success message """ db = await get_db() await db.execute( "INSERT INTO goals (goal, timeframe, category) VALUES (?, ?, ?)", (goal, timeframe, category), ) await db.commit() return f"✓ Set goal: {goal} ({timeframe}, {category})" - src/coach_ai/server.py:552-561 (registration)Registration of the set_goal tool using @mcp.tool() and delegation to the storage handler.
@mcp.tool() async def set_goal(goal: str, timeframe: str, category: str = "general") -> str: """Set a new goal. Args: goal: The goal description timeframe: When you want to achieve this (e.g., 'this week', 'this month', 'long-term') category: Category of the goal (e.g., 'career', 'health', 'personal', 'general') """ return await storage.set_goal(goal, timeframe, category)