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
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The project ID to update | |
| name | No | Updated name of the project | |
| public | No | Whether the project is public to the organization | |
| archived | No | Whether the project is archived | |
| color | No | Color of the project (light-green, light-orange, light-blue, etc.) | |
| members | No | Array of user GIDs that are members of this project | |
| followers | No | Array of user GIDs that are followers of this project | |
| project_brief | No | HTML-formatted string containing the description for the project brief | |
| layout | No | The layout of the project (board, list, timeline, or calendar) | |
| default_view | No | The default view of the project (list, board, calendar, timeline, or gantt) | |
| due_on | No | The date on which this project is due (YYYY-MM-DD format) | |
| start_on | No | The day on which work for this project begins (YYYY-MM-DD format) | |
| notes | No | Free-form textual information associated with the project | |
| html_notes | No | HTML-formatted notes for the project | |
| opt_fields | No | Comma-separated list of optional fields to include in the response |
Implementation Reference
- src/tool-handler.ts:398-444 (handler)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) }], }; }
- src/tools/project-tools.ts:209-284 (schema)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"] } };
- src/tool-handler.ts:61-103 (registration)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 ];
- src/utils/validation.ts:296-299 (helper)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;