Skip to main content
Glama

tasks_list_tool

Retrieve and display a specified number of tasks from the task management system to review current items and track progress.

Instructions

Get a list of tasks. Args: task_limit (int): The maximum number of tasks to return. Default is 10.

Returns: list[Task]: A list of tasks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core handler function for the 'tasks_list_tool' that executes the logic to fetch and return a list of tasks from the database, limited by task_limit.
    @mcp.tool()
    async def tasks_list_tool(
        ctx: Context[ServerSession, AppContext], task_limit: int = 10
    ) -> list[Task]:
        """Get a list of tasks.
        Args:
            task_limit (int): The maximum number of tasks to return. Default is 10.
    
        Returns:
            list[Task]: A list of tasks.
        """
        database: DatabaseABC = ctx.request_context.lifespan_context.db
        tasks = database.get_tasks(limit=task_limit)
        return [Task(**task.__dict__) for task in tasks]
  • Invocation of create_tasks_tools which registers the tasks_list_tool (and other task tools) with the FastMCP server instance.
    create_tasks_tools(mcp)
  • Pydantic BaseModel schema for Task objects returned by the tasks_list_tool.
    class Task(BaseModel):
        id: int = Field(default=None)
        title: str = Field(..., description="The title of the task")
        description: str = Field(default="", description="The description of the task")
        status: TaskStatus = TaskStatus.CREATED
        created_at: str = Field(default=None)
  • Enum defining TaskStatus used in the Task model schema.
    class TaskStatus(IntEnum):
        CREATED = 0
        IN_PROGRESS = 1
        COMPLETED = 2
  • Import of the create_tasks_tools function necessary for tool registration.
    from tools.tasks import create_tasks_tools
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states it returns a list of tasks but doesn't disclose behavioral traits such as whether it requires authentication, how it handles pagination, what sorting or filtering options exist, or if there are rate limits. For a list tool with no annotations, this is insufficient.

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 appropriately sized and front-loaded with the purpose, followed by structured sections for Args and Returns. It avoids unnecessary fluff, though the formatting could be slightly more polished.

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 (1 parameter) and the presence of an output schema (which handles return values), the description is somewhat complete but lacks critical context like usage guidelines and behavioral transparency. It's adequate for a simple list tool but has clear gaps.

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

Parameters3/5

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

The description adds minimal semantics beyond the input schema: it explains that 'task_limit' is the maximum number of tasks to return with a default of 10. However, with 0% schema description coverage and only 1 parameter, this provides some value but doesn't fully compensate for the lack of schema details (e.g., range constraints or usage context).

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 'Get a list of tasks' which clearly indicates the verb (get) and resource (tasks), but it doesn't differentiate this from sibling tools like 'filter_tasks_tool' or 'get_task_tool' which likely serve similar purposes. The purpose is clear but lacks sibling differentiation.

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 like 'filter_tasks_tool' or 'get_task_tool'. It mentions a default task limit but doesn't explain when this tool is appropriate compared to other task-related tools.

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/chipocrudos/tasks-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server