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
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | The task ID to retrieve | |
| opt_fields | No | Comma-separated list of optional fields to include |
Implementation Reference
- src/tool-handler.ts:132-138 (handler)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) }], }; }
- src/tools/task-tools.ts:244-261 (schema)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"] } };
- src/tool-handler.ts:19-24 (registration)Imports the getTaskTool from task-tools.ts as part of tool registration.searchTasksTool, getTaskTool, createTaskTool, updateTaskTool, createSubtaskTool, getMultipleTasksByGidTool
- src/tool-handler.ts:38-61 (registration)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, ];
- src/asana-client-wrapper.ts:117-120 (helper)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; }