asana_get_project_sections
Retrieve all sections within an Asana project to organize tasks and track workflow progress using the project ID.
Instructions
Get sections in a project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The project ID to get sections for | |
| opt_fields | No | Comma-separated list of optional fields to include |
Implementation Reference
- src/asana-client-wrapper.ts:192-198 (handler)Core handler implementation that fetches project sections using Asana's SectionsApi, conditionally including opt_fields.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; }
- src/tool-handler.ts:276-282 (handler)Tool dispatch handler that extracts parameters and calls AsanaClientWrapper.getProjectSections, returning JSON 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) }], }; }
- src/tools/project-tools.ts:69-86 (schema)Tool definition with name, description, and input schema validating project_id (required) and 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"] } };
- src/tool-handler.ts:48-48 (registration)Registers the tool in the all_tools array for availability.getProjectSectionsTool,
- src/tool-handler.ts:74-74 (registration)Includes the tool in READ_ONLY_TOOLS list for read-only mode filtering.'asana_get_project_sections',