asana_create_task_story
Add comments or updates to Asana tasks to track progress and communicate with team members.
Instructions
Create a comment or story on a task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | The task ID to add the story to | |
| text | Yes | The text content of the story/comment | |
| opt_fields | No | Comma-separated list of optional fields to include |
Implementation Reference
- src/tool-handler.ts:254-260 (handler)MCP tool handler switch case that processes the CallToolRequest for asana_create_task_story by extracting parameters and delegating to AsanaClientWrapper.createTaskStorycase "asana_create_task_story": { const { task_id, text, ...opts } = args; const response = await asanaClient.createTaskStory(task_id, text, opts); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }
- src/tools/story-tools.ts:22-43 (schema)Tool schema definition specifying input parameters (task_id, text, opt_fields) and description for validation in MCPexport const createTaskStoryTool: Tool = { name: "asana_create_task_story", description: "Create a comment or story on a task", inputSchema: { type: "object", properties: { task_id: { type: "string", description: "The task ID to add the story to" }, text: { type: "string", description: "The text content of the story/comment" }, opt_fields: { type: "string", description: "Comma-separated list of optional fields to include" } }, required: ["task_id", "text"] } };
- src/tool-handler.ts:92-95 (registration)The tool is imported from story-tools.ts and registered in the exported tools array used by the MCP serveraddFollowersToTaskTool, getStoriesForTaskTool, createTaskStoryTool, getTeamsForUserTool,
- src/asana-client-wrapper.ts:455-464 (helper)AsanaClientWrapper method that performs the actual API call to create a story/comment on a task via Asana StoriesApiasync createTaskStory(taskId: string, text: string, opts: any = {}) { const options = opts.opt_fields ? opts : {}; const body = { data: { text: text } }; const response = await this.stories.createStoryForTask(body, taskId, options); return response.data; }