Skip to main content
Glama
bsmi021

MCP Task Manager Server

by bsmi021

showTask

Retrieve detailed information about a specific task, including its dependencies and subtasks, by providing the project ID and task ID. Integrates with the MCP Task Manager Server for structured project tracking.

Instructions

Retrieves the full details of a single, specific task, including its dependencies and direct subtasks. Requires the project ID and the task ID. Returns a task object containing all details if found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesThe unique identifier (UUID) of the project the task belongs to.
task_idYesThe unique identifier of the task to retrieve details for.

Implementation Reference

  • The async processRequest function implements the core logic of the showTask tool: logs request, fetches task via TaskService.getTaskById, returns JSON stringified task as text content, handles NotFoundError and other errors appropriately.
    const processRequest = async (args: ShowTaskArgs) => {
        logger.info(`[${TOOL_NAME}] Received request with args:`, args);
        try {
            // Call the service method to get the task details
            const task = await taskService.getTaskById(args.project_id, args.task_id);
    
            // Format the successful response
            logger.info(`[${TOOL_NAME}] Found task ${args.task_id} in project ${args.project_id}`);
            return {
                content: [{
                    type: "text" as const,
                    text: JSON.stringify(task) // Return the full task object
                }]
            };
        } catch (error: unknown) {
            // Handle potential errors
            logger.error(`[${TOOL_NAME}] Error processing request:`, error);
    
            if (error instanceof NotFoundError) {
                // Specific error if the project or task wasn't found
                // Map to InvalidParams as the provided ID(s) are invalid in this context
                throw new McpError(ErrorCode.InvalidParams, error.message);
            } else {
                // Generic internal error
                const message = error instanceof Error ? error.message : 'An unknown error occurred while retrieving the task.';
                throw new McpError(ErrorCode.InternalError, message);
            }
        }
    };
  • Defines TOOL_NAME, TOOL_DESCRIPTION, TOOL_PARAMS Zod schema for input validation (project_id: UUID string, task_id: non-empty string), and inferred ShowTaskArgs type.
    export const TOOL_NAME = "showTask";
    
    export const TOOL_DESCRIPTION = `
    Retrieves the full details of a single, specific task, including its dependencies and direct subtasks.
    Requires the project ID and the task ID.
    Returns a task object containing all details if found.
    `;
    
    // Zod schema for the parameters, matching FR-004 and showTaskTool.md spec
    export const TOOL_PARAMS = z.object({
        project_id: z.string()
            .uuid("The project_id must be a valid UUID.")
            .describe("The unique identifier (UUID) of the project the task belongs to."), // Required, UUID format
    
        task_id: z.string()
            // Add .uuid() if task IDs are also UUIDs, otherwise keep as string
            .min(1, "Task ID cannot be empty.")
            .describe("The unique identifier of the task to retrieve details for."), // Required, string (or UUID)
    });
    
    // Define the expected type for arguments based on the Zod schema
    export type ShowTaskArgs = z.infer<typeof TOOL_PARAMS>;
  • Registers the showTask tool on the MCP server using server.tool() with name, description, param schema, and handler function.
    // Register the tool with the server
    server.tool(TOOL_NAME, TOOL_DESCRIPTION, TOOL_PARAMS.shape, processRequest);
  • Calls showTaskTool registration function during overall tool registration in index.ts, passing server and taskService instance.
    showTaskTool(server, taskService);
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses that it retrieves details (read operation) and specifies what's included (dependencies, direct subtasks), but lacks information about error handling, permissions needed, or rate limits. It adequately describes the core behavior but misses some operational context.

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?

Three concise sentences with zero waste: first states purpose, second states requirements, third states return value. Each sentence earns its place by providing essential information without redundancy.

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?

For a read-only tool with 2 parameters, 100% schema coverage, and no output schema, the description is reasonably complete. It covers purpose, requirements, and return content. However, without annotations or output schema, it could benefit from more detail on error cases or exact return structure.

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?

Schema description coverage is 100%, so the schema already fully documents both parameters. The description adds no additional parameter semantics beyond stating they are required, which is already clear from the schema. Baseline 3 is appropriate when schema does all the work.

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 clearly states the specific action ('Retrieves'), the resource ('full details of a single, specific task'), and distinguishes it from siblings by specifying it returns details including dependencies and direct subtasks, unlike listTasks (which lists multiple tasks) or getNextTask (which focuses on next task).

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?

The description explicitly states 'Requires the project ID and the task ID', providing clear prerequisites. It distinguishes from listTasks by focusing on a single task, but does not explicitly mention when NOT to use it or name alternatives beyond what's implied by sibling names.

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

Related 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/bsmi021/mcp-task-manager-server'

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