Skip to main content
Glama

get_task_tool

Retrieve a specific task by its ID to view details or check status within the Tasks MCP Server's management system.

Instructions

Get a task by ID. Args: task_id (int): The ID of the task to retrieve.

Returns: Task: The task object if found, otherwise None.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function that implements the logic for the 'get_task_tool' MCP tool. It retrieves a task from the database by ID and returns a Task object or None.
    @mcp.tool()
    async def get_task_tool(
        ctx: Context[ServerSession, AppContext], task_id: int
    ) -> Task | None:
        """Get a task by ID.
        Args:
            task_id (int): The ID of the task to retrieve.
    
        Returns:
            Task: The task object if found, otherwise None.
        """
        database: DatabaseABC = ctx.request_context.lifespan_context.db
        task = database.get_task(task_id=task_id)
        return Task(**task.__dict__) if task else None
  • The call to create_tasks_tools(mcp) which invokes the decorators to register the get_task_tool (and other task tools) with the FastMCP server.
    create_tasks_tools(mcp)
  • Import of the create_tasks_tools function used to register the task tools including get_task_tool.
    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 mentions the return behavior ('The task object if found, otherwise None'), which is helpful, but lacks details on error handling, authentication needs, rate limits, or other behavioral traits. This is a significant gap for a tool with no annotation coverage.

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 sized and front-loaded, with a clear purpose statement followed by structured sections for Args and Returns. Every sentence earns its place, making it efficient and easy to parse.

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's low complexity (1 parameter) and the presence of an output schema (which handles return values), the description is mostly complete. It covers the basic purpose and parameter semantics, but gaps in behavioral transparency and usage guidelines prevent a higher score.

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?

Schema description coverage is 0%, so the description must compensate. It adds meaning by explaining that 'task_id' is 'The ID of the task to retrieve', which clarifies the parameter's purpose beyond the schema's basic type. However, it doesn't specify format constraints or examples, leaving some semantic gaps.

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 verb 'Get' and resource 'task by ID', making the purpose specific and understandable. However, it doesn't differentiate from siblings like 'get_tasks_status' or 'tasks_list_tool' which might also retrieve tasks, leaving room for ambiguity in sibling distinction.

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?

No guidance is provided on when to use this tool versus alternatives such as 'filter_tasks_tool' or 'tasks_list_tool'. The description only states what it does, not when it's appropriate, leaving the agent without usage context.

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