Skip to main content
Glama

get_task_details

Retrieve detailed information about a specific task, including its status and dependencies, to monitor progress and coordinate workflow execution.

Instructions

Get details of a specific task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesID of the task to get details for

Implementation Reference

  • The handler function for the 'get_task_details' tool. It extracts the task_id from arguments, retrieves the task from the tasks object, and returns its JSON details or throws an error if not found.
    case "get_task_details": {
      const { task_id } = request.params.arguments as { task_id: string };
      debug(`Getting details for task ${task_id}`);
    
      const task = tasks[task_id];
      if (!task) {
        throw new McpError(ErrorCode.InvalidRequest, `Task ${task_id} not found`);
      }
    
      return {
        content: [{
          type: "text",
          text: JSON.stringify(task, null, 2)
        }]
      };
    }
  • src/index.ts:447-460 (registration)
    Registration of the 'get_task_details' tool in the ListTools response, including its name, description, and input schema definition.
    {
      name: "get_task_details",
      description: "Get details of a specific task",
      inputSchema: {
        type: "object",
        properties: {
          task_id: {
            type: "string",
            description: "ID of the task to get details for"
          }
        },
        required: ["task_id"]
      }
    }
  • TypeScript interface defining the structure of a Task, which is used by the get_task_details handler to type-check and serialize the returned task data.
    interface Task {
      id: string;
      description: string;
      status: 'pending' | 'in_progress' | 'completed';
      assignedTo?: string;
      result?: string;
      dependencies?: string[];
    }

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/mokafari/orchestrator-server'

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