Skip to main content
Glama
by cristip73

asana_get_project_sections

Retrieve all sections within a specific Asana project to organize and categorize tasks effectively. Use this tool to access project structure and manage workflow sections.

Instructions

Get sections in a project

Input Schema

NameRequiredDescriptionDefault
project_idYesThe project ID to get sections for
opt_fieldsNoComma-separated list of optional fields to include

Input Schema (JSON Schema)

{ "properties": { "opt_fields": { "description": "Comma-separated list of optional fields to include", "type": "string" }, "project_id": { "description": "The project ID to get sections for", "type": "string" } }, "required": [ "project_id" ], "type": "object" }

Implementation Reference

  • MCP tool handler case that destructures input parameters and calls the Asana client wrapper's getProjectSections method, returning the JSON stringified response.
    case "asana_get_project_sections": { const { project_id, ...opts } = args; const response = await asanaClient.getProjectSections(project_id, opts); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }
  • Tool definition with name, description, and input schema specifying required project_id and optional opt_fields.
    export const getProjectSectionsTool: Tool = { name: "asana_get_project_sections", description: "Get sections in a project", inputSchema: { type: "object", properties: { project_id: { type: "string", description: "The project ID to get sections for" }, opt_fields: { type: "string", description: "Comma-separated list of optional fields to include" } }, required: ["project_id"] } };
  • Core helper method in AsanaClientWrapper that instantiates SectionsApi and calls getSectionsForProject to fetch sections for the given project ID.
    async getProjectSections(projectId: string, opts: any = {}) { // Only include opts if opt_fields was actually provided const options = opts.opt_fields ? opts : {}; const sections = new Asana.SectionsApi(); const response = await sections.getSectionsForProject(projectId, options); return response.data; }
  • Registration of all tools including getProjectSectionsTool (line 66) in the exported tools array used 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 ];
  • Input validation case ensuring project_id is a valid Asana GID.
    case 'asana_get_project_sections': result = validateGid(params.project_id, 'project_id'); if (!result.valid) errors.push(...result.errors); break;

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