Skip to main content
Glama

get_task_detail

Retrieve comprehensive task details by ID, including implementation guides and verification criteria, to ensure accurate execution and planning.

Instructions

Get the complete detailed information of a task based on its ID, including unabridged implementation guides and verification criteria, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYesTask ID to view details

Implementation Reference

  • The core handler function for the 'get_task_detail' tool. It fetches the task details using searchTasksWithCommand (which supports memory areas), generates a formatted prompt with getTaskDetailPrompt, and handles errors.
    export async function getTaskDetail({
      taskId,
    }: z.infer<typeof getTaskDetailSchema>) {
      try {
        // Use searchTasksWithCommand instead of getTaskById to implement memory area task search
        // Set isId to true to search by ID; page number is 1, page size is 1
        const result = await searchTasksWithCommand(taskId, true, 1, 1);
    
        // Check if the task is found
        if (result.tasks.length === 0) {
          return {
            content: [
              {
                type: "text" as const,
                text: `## Error\n\nTask with ID \`${taskId}\` not found. Please confirm if the task ID is correct.`,
              },
            ],
            isError: true,
          };
        }
    
        // Get the found task (the first and only one)
        const task = result.tasks[0];
    
        // Use prompt generator to get the final prompt
        const prompt = getTaskDetailPrompt({
          taskId,
          task,
        });
    
        return {
          content: [
            {
              type: "text" as const,
              text: prompt,
            },
          ],
        };
      } catch (error) {
        // Use prompt generator to get error message
        const errorPrompt = getTaskDetailPrompt({
          taskId,
          error: error instanceof Error ? error.message : String(error),
        });
    
        return {
          content: [
            {
              type: "text" as const,
              text: errorPrompt,
            },
          ],
          isError: true,
        };
      }
    }
  • Zod schema defining the input for getTaskDetail: requires a non-empty taskId string.
    export const getTaskDetailSchema = z.object({
      taskId: z
        .string()
        .min(1, {
          message: "Task ID cannot be empty, please provide a valid task ID",
        })
        .describe("Task ID to view details"),
    });
  • src/index.ts:312-317 (registration)
    Tool registration in the MCP server's ListToolsRequest handler, specifying name, description from MD template, and JSON schema from Zod.
      name: "get_task_detail",
      description: loadPromptFromTemplate(
        "toolsDescription/getTaskDetail.md"
      ),
      inputSchema: zodToJsonSchema(getTaskDetailSchema),
    },
  • Dispatch handler in the MCP server's CallToolRequest handler: validates input with schema and calls the getTaskDetail function.
    case "get_task_detail":
      parsedArgs = await getTaskDetailSchema.safeParseAsync(
        request.params.arguments
      );
      if (!parsedArgs.success) {
        throw new Error(
          `Invalid arguments for tool ${request.params.name}: ${parsedArgs.error.message}`
        );
      }
      result = await getTaskDetail(parsedArgs.data);
      return result;
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states this is a read operation ('Get'), implying it's non-destructive, but doesn't disclose behavioral traits like whether it requires authentication, has rate limits, returns errors for invalid IDs, or provides pagination for large details. The mention of 'unabridged implementation guides and verification criteria' hints at rich output but lacks specifics on format or limitations.

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 a single, efficient sentence that front-loads the core purpose ('Get the complete detailed information of a task based on its ID') and adds specifics about included content. There's no wasted text, though it could be slightly more structured by separating usage context from details.

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 one parameter with full schema coverage and no output schema, the description is moderately complete: it clarifies the tool's purpose and output scope. However, for a read operation with no annotations, it should ideally mention safety (non-destructive), error handling, or output format to better guide the agent, leaving some gaps in contextual understanding.

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% with one parameter 'taskId' documented as 'Task ID to view details'. The description adds minimal value beyond the schema by implying the ID is used to retrieve detailed information, but doesn't specify format constraints (e.g., numeric vs. string) or examples. Baseline is 3 since the schema adequately covers the parameter.

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 'complete detailed information of a task based on its ID', specifying it includes 'unabridged implementation guides and verification criteria'. It distinguishes from siblings like list_tasks (listing) and query_task (searching) by focusing on detailed retrieval of a single task. However, it doesn't explicitly differentiate from analyze_task or verify_task which might also provide detailed information.

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 query_task (which might search tasks), analyze_task (which might analyze task details), or verify_task (which might verify criteria). It mentions what information is included but gives no context about prerequisites, when this is the appropriate choice among similar tools, or any exclusions.

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/liorfranko/mcp-chain-of-thought'

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