Skip to main content
Glama
cristip73

MCP Server for Asana

by cristip73

asana_update_project

Modify project details in Asana, including name, status, members, timeline, layout, and description fields.

Instructions

Update details of an existing project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesThe project ID to update
nameNoUpdated name of the project
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)
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 in the response

Implementation Reference

  • The handler case for 'asana_update_project' that processes input arguments, removes fields requiring separate tools (members, followers, etc.), calls the Asana client's updateProject method, and returns the JSON response or a warning message.
    case "asana_update_project": {
      const { project_id, ...projectData } = args;
      
      // Extragem opt_fields pentru opțiuni
      const { opt_fields, ...restData } = projectData;
      
      // Câmpuri problematice care necesită API-uri separate
      const problematicFields = ['members', 'followers', 'public', 'html_notes', 'start_on'];
      let hasProblematicFields = false;
      
      // Verificăm dacă există câmpuri problematice în datele de actualizare
      for (const field of problematicFields) {
        if (field in restData) {
          // Înlăturăm câmpul problematic din datele trimise către API
          delete restData[field];
          hasProblematicFields = true;
        }
      }
      
      // Pregătim datele pentru actualizare
      const data = {
        ...restData
      };
      
      const response = await asanaClient.updateProject(project_id, data, { opt_fields });
      
      // Avertizare pentru utilizator dacă au fost înlăturate câmpuri problematice
      if (hasProblematicFields) {
        return {
          content: [
            { 
              type: "text", 
              text: "Unele câmpuri nu pot fi actualizate direct prin updateProject și necesită API-uri separate:\n" +
                    "- Pentru a actualiza membrii, folosește asana_add_members_for_project\n" +
                    "- Pentru a actualiza followeri, folosește asana_add_followers_for_project\n" +
                    "- Câmpurile public, html_notes și start_on au de asemenea limitări\n\n" +
                    "Proiectul a fost actualizat cu succes pentru celelalte câmpuri. Iată răspunsul:\n" + 
                    JSON.stringify(response) 
            }
          ],
        };
      }
      
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
  • The Tool schema definition for 'asana_update_project', specifying the input parameters, their types, descriptions, and required fields.
    export const updateProjectTool: Tool = {
      name: "asana_update_project",
      description: "Update details of an existing project",
      inputSchema: {
        type: "object",
        properties: {
          project_id: {
            type: "string",
            description: "The project ID to update"
          },
          name: {
            type: "string",
            description: "Updated name of the project"
          },
          public: {
            type: "boolean",
            description: "Whether the project is public to the organization"
          },
          archived: {
            type: "boolean",
            description: "Whether the project is archived"
          },
          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_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 in the response"
          }
        },
        required: ["project_id"]
      }
    };
  • Registers 'updateProjectTool' (line 69) in the main exported tools array for MCP tool discovery.
    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
    ];
  • Validation helper that ensures 'project_id' is a valid Asana GID before executing the tool.
    case 'asana_update_project':
      result = validateGid(params.project_id, 'project_id');
      if (!result.valid) errors.push(...result.errors);
      break;
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Update' implies a mutation operation, but the description doesn't specify permission requirements, whether changes are reversible, rate limits, or what happens to unspecified fields (partial vs. full updates). For a 15-parameter mutation tool, this leaves significant behavioral gaps.

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 that gets straight to the point with zero wasted words. It's appropriately sized for a tool with comprehensive schema documentation and follows the principle of front-loading the core purpose.

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 mutation tool with 15 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't address behavioral aspects like error conditions, response format, or side effects. The agent must rely entirely on the input schema and trial-and-error, which is inadequate for a complex update operation.

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?

Schema description coverage is 100%, so the schema already documents all 15 parameters thoroughly with descriptions and formats. The description adds no additional parameter semantics beyond implying 'details' covers the schema's fields. This meets the baseline of 3 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 ('update') and resource ('details of an existing project'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'asana_update_task' or other update operations, missing an opportunity to specify it's for project metadata rather than task updates.

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_create_project' for new projects or 'asana_get_project' for reading. It doesn't mention prerequisites (e.g., needing an existing project ID) or contextual constraints, 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