Skip to main content
Glama
by cristip73

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:

  1. Get all data at once: Use auto_paginate=true

  2. Manual pagination: First request with limit=N, then use the returned 'next_offset' tokens in subsequent requests

  3. 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

NameRequiredDescriptionDefault
project_idYesID of the project to get hierarchy for
include_completed_tasksNoInclude completed tasks (default: false)
include_subtasksNoInclude subtasks for each task (default: true)
include_completed_subtasksNoInclude completed subtasks (default: follows include_completed_tasks)
max_subtask_depthNoMaximum depth of subtasks to retrieve (default: 1, meaning only direct subtasks)
opt_fields_tasksNoOptional fields for tasks (e.g. 'name,notes,assignee,due_on,completed')
opt_fields_subtasksNoOptional fields for subtasks (if not specified, uses same as tasks)
opt_fields_sectionsNoOptional fields for sections (e.g. 'name,created_at')
opt_fields_projectNoOptional fields for project (e.g. 'name,created_at,owner')
limitNoMax results per page (1-100). For pagination, set this and don't use auto_paginate
offsetNoPagination token from previous response. MUST be valid token from section.pagination_info.next_offset
auto_paginateNoIf true, automatically gets all pages and combines results (limited by max_pages)
max_pagesNoMaximum pages to fetch when auto_paginate is true (protects against infinite loops)

Input Schema (JSON Schema)

{ "properties": { "auto_paginate": { "default": false, "description": "If true, automatically gets all pages and combines results (limited by max_pages)", "type": "boolean" }, "include_completed_subtasks": { "description": "Include completed subtasks (default: follows include_completed_tasks)", "type": "boolean" }, "include_completed_tasks": { "description": "Include completed tasks (default: false)", "type": "boolean" }, "include_subtasks": { "description": "Include subtasks for each task (default: true)", "type": "boolean" }, "limit": { "description": "Max results per page (1-100). For pagination, set this and don't use auto_paginate", "maximum": 100, "minimum": 1, "type": "number" }, "max_pages": { "default": 10, "description": "Maximum pages to fetch when auto_paginate is true (protects against infinite loops)", "type": "number" }, "max_subtask_depth": { "default": 1, "description": "Maximum depth of subtasks to retrieve (default: 1, meaning only direct subtasks)", "maximum": 10, "minimum": 1, "type": "number" }, "offset": { "description": "Pagination token from previous response. MUST be valid token from section.pagination_info.next_offset", "type": "string" }, "opt_fields_project": { "description": "Optional fields for project (e.g. 'name,created_at,owner')", "type": "string" }, "opt_fields_sections": { "description": "Optional fields for sections (e.g. 'name,created_at')", "type": "string" }, "opt_fields_subtasks": { "description": "Optional fields for subtasks (if not specified, uses same as tasks)", "type": "string" }, "opt_fields_tasks": { "description": "Optional fields for tasks (e.g. 'name,notes,assignee,due_on,completed')", "type": "string" }, "project_id": { "description": "ID of the project to get hierarchy for", "type": "string" } }, "required": [ "project_id" ], "type": "object" }

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