asana_get_task_stories
Retrieve comments and activity history for any Asana task to track progress, review discussions, and understand task evolution.
Instructions
Get comments and stories for a specific task
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | The task ID to get stories for | |
| opt_fields | No | Comma-separated list of optional fields to include |
Input Schema (JSON Schema)
{
"properties": {
"opt_fields": {
"description": "Comma-separated list of optional fields to include",
"type": "string"
},
"task_id": {
"description": "The task ID to get stories for",
"type": "string"
}
},
"required": [
"task_id"
],
"type": "object"
}
Implementation Reference
- src/tool-handler.ts:182-188 (handler)The main handler case for the 'asana_get_task_stories' tool in the central tool handler switch statement. It destructures arguments, calls the Asana client wrapper method, and formats the response as MCP CallToolResult.case "asana_get_task_stories": { const { task_id, ...opts } = args; const response = await asanaClient.getStoriesForTask(task_id, opts); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }
- src/asana-client-wrapper.ts:383-386 (helper)The core implementation in AsanaClientWrapper that wraps the Asana SDK StoriesApi.getStoriesForTask method, handling the actual API call to retrieve stories for a task.async getStoriesForTask(taskId: string, opts: any = {}) { const response = await this.stories.getStoriesForTask(taskId, opts); return response.data; }
- src/tools/story-tools.ts:3-20 (schema)The Tool schema definition including name, description, and inputSchema for validating parameters like task_id.export const getStoriesForTaskTool: Tool = { name: "asana_get_task_stories", description: "Get comments and stories for a specific task", inputSchema: { type: "object", properties: { task_id: { type: "string", description: "The task ID to get stories for" }, opt_fields: { type: "string", description: "Comma-separated list of optional fields to include" } }, required: ["task_id"] } };
- src/tool-handler.ts:93-93 (registration)Registration of the tool in the main tools array exported for MCP tool discovery.getStoriesForTaskTool,
- src/tool-handler.ts:47-48 (registration)Import of the getStoriesForTaskTool from story-tools.js for registration in the main handler.getStoriesForTaskTool, createTaskStoryTool