Skip to main content
Glama
cristip73

MCP Server for Asana

by cristip73

asana_create_project

Create a new project in Asana by specifying name, workspace, team, layout, and optional details like color, members, and due dates.

Instructions

Create a new project in a workspace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspace_idNoThe workspace ID to create the project in (optional if DEFAULT_WORKSPACE_ID is set)
nameYesName of the project to create
team_idNoREQUIRED for organization workspaces: The team GID to share the project with
publicNoWhether the project is public to the organization
archivedNoWhether the project is archived
colorNoColor of the project (light-green, light-orange, light-blue, etc.)
membersNoArray of user GIDs that are members of this project
followersNoArray of user GIDs that are followers of this project
project_briefNoHTML-formatted string containing the description for the project brief
layoutNoThe layout of the project (board, list, timeline, or calendar)list
default_viewNoThe default view of the project (list, board, calendar, timeline, or gantt)
due_onNoThe date on which this project is due (YYYY-MM-DD format)
start_onNoThe day on which work for this project begins (YYYY-MM-DD format)
notesNoFree-form textual information associated with the project
html_notesNoHTML-formatted notes for the project
opt_fieldsNoComma-separated list of optional fields to include

Implementation Reference

  • Handler implementation for the 'asana_create_project' tool. Processes input arguments, normalizes members and followers arrays into Asana API format, and delegates to AsanaClientWrapper.createProjectForWorkspace.
    case "asana_create_project": {
      const { workspace_id, ...projectData } = args;
      
      // Extragem opt_fields pentru opțiuni
      const { opt_fields, ...restData } = projectData;
      
      // Pregătim datele pentru proiect
      const data = {
        ...restData
      };
      
      // Verificăm dacă avem team_id și îl păstrăm, în asana-client-wrapper
      // va fi redenumit automat în team
      
      // Conversia array-urilor în formatul așteptat de API
      if (data.members && Array.isArray(data.members)) {
        data.members = data.members.map((id: string) => ({ gid: id }));
      }
      
      if (data.followers && Array.isArray(data.followers)) {
        data.followers = data.followers.map((id: string) => ({ gid: id }));
      }
      
      const response = await asanaClient.createProjectForWorkspace(workspace_id || undefined, data, { opt_fields });
      
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
  • Input schema definition for the 'asana_create_project' tool, specifying parameters like workspace_id, name, team_id, public, etc.
    export const createProjectForWorkspaceTool: Tool = {
      name: "asana_create_project",
      description: "Create a new project in a workspace",
      inputSchema: {
        type: "object",
        properties: {
          workspace_id: {
            type: "string",
            description: "The workspace ID to create the project in (optional if DEFAULT_WORKSPACE_ID is set)"
          },
          name: {
            type: "string",
            description: "Name of the project to create"
          },
          team_id: {
            type: "string",
            description: "REQUIRED for organization workspaces: The team GID to share the project with"
          },
          public: {
            type: "boolean",
            description: "Whether the project is public to the organization",
            default: false
          },
          archived: {
            type: "boolean",
            description: "Whether the project is archived",
            default: false
          },
          color: {
            type: "string",
            description: "Color of the project (light-green, light-orange, light-blue, etc.)"
          },
          members: {
            type: "array",
            items: {
              type: "string"
            },
            description: "Array of user GIDs that are members of this project"
          },
          followers: {
            type: "array",
            items: {
              type: "string"
            },
            description: "Array of user GIDs that are followers of this project"
          },
          project_brief: {
            type: "string",
            description: "HTML-formatted string containing the description for the project brief"
          },
          layout: {
            type: "string",
            description: "The layout of the project (board, list, timeline, or calendar)",
            default: "list"
          },
          default_view: {
            type: "string",
            description: "The default view of the project (list, board, calendar, timeline, or gantt)"
          },
          due_on: {
            type: "string",
            description: "The date on which this project is due (YYYY-MM-DD format)"
          },
          start_on: {
            type: "string",
            description: "The day on which work for this project begins (YYYY-MM-DD format)"
          },
          notes: {
            type: "string",
            description: "Free-form textual information associated with the project"
          },
          html_notes: {
            type: "string",
            description: "HTML-formatted notes for the project"
          },
          opt_fields: {
            type: "string",
            description: "Comma-separated list of optional fields to include"
          }
        },
        required: ["name"]
      }
    };
  • Registration of the tool in the main tools array export. The createProjectForWorkspaceTool (named 'asana_create_project') is included at position corresponding to line 68.
    export const tools: Tool[] = [
      listWorkspacesTool,
      searchProjectsTool,
      getProjectTool,
      getProjectTaskCountsTool,
      getProjectSectionsTool,
      createSectionForProjectTool,
      createProjectForWorkspaceTool,
      updateProjectTool,
      reorderSectionsTool,
      getProjectStatusTool,
      getProjectStatusesForProjectTool,
      createProjectStatusTool,
      deleteProjectStatusTool,
      searchTasksTool,
      getTaskTool,
      createTaskTool,
      updateTaskTool,
      createSubtaskTool,
      getMultipleTasksByGidTool,
      addTaskToSectionTool,
      getTasksForSectionTool,
      getProjectHierarchyTool,
      getSubtasksForTaskTool,
      getTasksForProjectTool,
      getTasksForTagTool,
      getTagsForWorkspaceTool,
      addTagsToTaskTool,
      addTaskDependenciesTool,
      addTaskDependentsTool,
      setParentForTaskTool,
      addFollowersToTaskTool,
      getStoriesForTaskTool,
      createTaskStoryTool,
      getTeamsForUserTool,
      getTeamsForWorkspaceTool,
      addMembersForProjectTool,
      addFollowersForProjectTool,
      getUsersForWorkspaceTool,
      getAttachmentsForObjectTool,
      uploadAttachmentForObjectTool,
      downloadAttachmentTool
    ];
  • Core API wrapper method called by the tool handler. Prepares request data (renames team_id to team, handles default workspace), constructs the API body with workspace, and calls Asana SDK's createProject.
    async createProjectForWorkspace(workspaceId: string | undefined, data: any, opts: any = {}) {
      try {
        // Use default workspace if not specified and available
        if (!workspaceId && this.defaultWorkspaceId) {
          workspaceId = this.defaultWorkspaceId;
        }
        
        if (!workspaceId) {
          throw new Error("No workspace specified and no default workspace ID set");
        }
        
        // Pregătim datele pentru cerere
        const requestData = { ...data };
        
        // Redenumim team_id în team dacă există
        if (requestData.team_id) {
          requestData.team = requestData.team_id;
          delete requestData.team_id;
        }
        
        // Asana API are nevoie de parametrii corecți
        const body = {
          data: {
            // Includem workspace direct
            workspace: workspaceId,
            // Includem toate celelalte date dar fără workspace sau workspace_id
            // deoarece sunt deja transmise prin parametrul workspaceId
            ...requestData
          }
        };
        
        // Eliminăm parametrii redundanți dacă există
        delete body.data.workspace_id;
        delete body.data.workspace; // Evităm duplicarea - am pus deja workspaceId ca workspace
        
        // Folosim metoda standard createProject
        const response = await this.projects.createProject(body, opts);
        return response.data;
      } catch (error: any) {
        console.error(`Error creating project for workspace: ${error}`);
        
        // Adăugăm mai multe detalii despre eroare pentru debugging
        if (error.response && error.response.body) {
          console.error(`Response error details: ${JSON.stringify(error.response.body, null, 2)}`);
        }
        
        throw error;
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure but only states the basic action. It doesn't mention authentication requirements, rate limits, error conditions, what happens on success (e.g., returns project ID), or side effects like notifications to members. For a creation tool with 16 parameters, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's front-loaded with the core action and resource, making it immediately scannable and appropriately sized for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a creation tool with 16 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what the tool returns (critical for a creation operation), doesn't mention behavioral aspects like permissions or side effects, and provides no usage context. The schema handles parameter documentation, but the description fails to add necessary operational context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so all parameters are documented in the schema itself. The description adds no additional parameter information beyond what's in the schema, not explaining relationships between parameters (e.g., 'team_id' requirement for organization workspaces is only in schema). Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Create') and resource ('new project in a workspace'), making the purpose immediately understandable. However, it doesn't distinguish this tool from sibling tools like 'asana_create_task' or 'asana_create_project_status' beyond the obvious resource difference, missing explicit differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'asana_update_project' or 'asana_search_projects'. There's no mention of prerequisites, dependencies, or typical use cases, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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