Skip to main content
Glama
cristip73

MCP Server for Asana

by cristip73

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
NameRequiredDescriptionDefault
task_idYesThe task ID to add the story to
textYesThe text content of the story/comment
opt_fieldsNoComma-separated list of optional fields to include

Implementation Reference

  • MCP tool handler switch case that processes the CallToolRequest for asana_create_task_story by extracting parameters and delegating to AsanaClientWrapper.createTaskStory
    case "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) }],
      };
    }
  • Tool schema definition specifying input parameters (task_id, text, opt_fields) and description for validation in MCP
    export 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"]
      }
    };
  • The tool is imported from story-tools.ts and registered in the exported tools array used by the MCP server
    addFollowersToTaskTool,
    getStoriesForTaskTool,
    createTaskStoryTool,
    getTeamsForUserTool,
  • AsanaClientWrapper method that performs the actual API call to create a story/comment on a task via Asana StoriesApi
    async 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;
    }

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

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