Skip to main content
Glama

list_goals

Retrieve and filter goals from Coach AI's task management system to track progress and maintain focus on objectives.

Instructions

List all goals.

Args: status: Filter by 'active' or 'all' (default: 'active')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoactive

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The actual implementation of the 'list_goals' function which queries the database and formats the list of goals.
    async def list_goals(status: str = "active") -> str:
        """List all goals.
    
        Args:
            status: Filter by 'active' or 'all'
    
        Returns:
            Formatted list of goals
        """
        db = await get_db()
    
        if status == "all":
            cursor = await db.execute("SELECT * FROM goals ORDER BY created_at DESC")
        else:
            cursor = await db.execute(
                "SELECT * FROM goals WHERE status = ? ORDER BY created_at DESC", (status,)
            )
    
        rows = await cursor.fetchall()
    
        if not rows:
            return f"No {status} goals found."
    
        result = f"\n=== {status.upper()} GOALS ===\n\n"
    
        # Group by timeframe
        timeframes = {}
        for row in rows:
            tf = row["timeframe"]
            if tf not in timeframes:
                timeframes[tf] = []
            timeframes[tf].append(row)
    
        for timeframe, goals in timeframes.items():
            result += f"{timeframe.upper()}:\n"
            for goal in goals:
                result += f"  [{goal['id']}] {goal['goal']} ({goal['category']})\n"
            result += "\n"
    
        return result.strip()
  • The MCP tool registration for 'list_goals' in server.py, which delegates the call to storage.list_goals.
    @mcp.tool()
    async def list_goals(status: str = "active") -> str:
        """List all goals.
    
        Args:
            status: Filter by 'active' or 'all' (default: 'active')
        """
        return await storage.list_goals(status)
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 but provides almost none. It does not confirm the read-only nature (beyond the verb 'List'), describe output format, explain empty result handling, or mention sorting/ordering behavior despite having an output schema that likely returns collections.

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

Conciseness5/5

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

The description is appropriately terse with zero redundancy. The purpose is front-loaded in the first sentence, followed by a structured Args section. Every line earns its place; there is no fluff or unnecessary verbosity despite the minimal content.

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?

Given the tool's low complexity (one optional parameter) and the existence of an output schema, the description is minimally adequate. However, the lack of annotations, sibling differentiation, and behavioral context leaves gaps that prevent it from being fully self-sufficient for an agent to use optimally.

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?

With 0% schema description coverage, the description successfully compensates by documenting the single parameter in the Args section. It provides semantic meaning ('Filter by'), valid enum values ('active' or 'all'), and default behavior that the schema omits, effectively bridging the documentation gap.

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

Purpose3/5

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

The description states the basic action ('List') and resource ('goals'), but provides no scoping details or differentiation from sibling tools like 'list_todos' or 'set_goal'. It meets the minimum threshold of clarity but lacks the specificity to distinguish when to query goals versus todos.

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 offers no guidance on when to use this tool versus alternatives (e.g., 'list_todos' for tasks or 'set_goal' for creation). It also fails to advise when to use 'active' vs 'all' filters, leaving contextual decisions to the agent without support.

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