Skip to main content
Glama

asana_get_task

Retrieve detailed information about a specific Asana task using its task ID, including optional fields for comprehensive project management data.

Instructions

Get detailed information about a specific task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesThe task ID to retrieve
opt_fieldsNoComma-separated list of optional fields to include

Implementation Reference

  • The switch case handler that executes the asana_get_task tool by calling the AsanaClientWrapper's getTask method with task_id and optional fields.
    case "asana_get_task": {
      const { task_id, ...opts } = args;
      const response = await asanaClient.getTask(task_id, opts);
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
  • Defines the Tool schema for asana_get_task, specifying input parameters task_id (required) and opt_fields.
    export const getTaskTool: Tool = {
      name: "asana_get_task",
      description: "Get detailed information about a specific task",
      inputSchema: {
        type: "object",
        properties: {
          task_id: {
            type: "string",
            description: "The task ID to retrieve"
          },
          opt_fields: {
            type: "string",
            description: "Comma-separated list of optional fields to include"
          }
        },
        required: ["task_id"]
      }
    };
  • Imports the getTaskTool from task-tools.ts as part of tool registration.
    searchTasksTool,
    getTaskTool,
    createTaskTool,
    updateTaskTool,
    createSubtaskTool,
    getMultipleTasksByGidTool
  • Registers getTaskTool in the all_tools array used to export the list of available tools.
    const all_tools: Tool[] = [
      listWorkspacesTool,
      searchProjectsTool,
      searchTasksTool,
      getTaskTool,
      createTaskTool,
      getStoriesForTaskTool,
      updateTaskTool,
      getProjectTool,
      getProjectTaskCountsTool,
      getProjectSectionsTool,
      createTaskStoryTool,
      addTaskDependenciesTool,
      addTaskDependentsTool,
      createSubtaskTool,
      getMultipleTasksByGidTool,
      getProjectStatusTool,
      getProjectStatusesForProjectTool,
      createProjectStatusTool,
      deleteProjectStatusTool,
      setParentForTaskTool,
      getTasksForTagTool,
      getTagsForWorkspaceTool,
    ];
  • Helper method in AsanaClientWrapper that wraps the Asana SDK's getTask API call to retrieve task details.
    async getTask(taskId: string, opts: any = {}) {
      const response = await this.tasks.getTask(taskId, opts);
      return response.data;
    }

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/roychri/mcp-server-asana'

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