asana_get_project_hierarchy
Retrieve the complete hierarchical structure of any Asana project including sections, tasks, and subtasks with flexible pagination options for efficient data management.
Instructions
Get the complete hierarchical structure of an Asana project, including its sections, tasks, and subtasks. Supports both manual and automatic pagination.
PAGINATION GUIDE:
Get all data at once: Use auto_paginate=true
Manual pagination: First request with limit=N, then use the returned 'next_offset' tokens in subsequent requests
Tips for large projects: Specify only needed fields, set include_subtasks=false if subtasks aren't needed
EXAMPLES:
For all data: {project_id:"123", auto_paginate:true}
For first page: {project_id:"123", limit:10}
For next page: {project_id:"123", limit:10, offset:"eyJ0a..."}
For deep subtasks: {project_id:"123", include_subtasks:true, max_subtask_depth:3} Note: offset must be a token from previous response (section.pagination_info.next_offset)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | ID of the project to get hierarchy for | |
| include_completed_tasks | No | Include completed tasks (default: false) | |
| include_subtasks | No | Include subtasks for each task (default: true) | |
| include_completed_subtasks | No | Include completed subtasks (default: follows include_completed_tasks) | |
| max_subtask_depth | No | Maximum depth of subtasks to retrieve (default: 1, meaning only direct subtasks) | |
| opt_fields_tasks | No | Optional fields for tasks (e.g. 'name,notes,assignee,due_on,completed') | |
| opt_fields_subtasks | No | Optional fields for subtasks (if not specified, uses same as tasks) | |
| opt_fields_sections | No | Optional fields for sections (e.g. 'name,created_at') | |
| opt_fields_project | No | Optional fields for project (e.g. 'name,created_at,owner') | |
| limit | No | Max results per page (1-100). For pagination, set this and don't use auto_paginate | |
| offset | No | Pagination token from previous response. MUST be valid token from section.pagination_info.next_offset | |
| auto_paginate | No | If true, automatically gets all pages and combines results (limited by max_pages) | |
| max_pages | No | Maximum pages to fetch when auto_paginate is true (protects against infinite loops) |