> ## Documentation Index
> Fetch the complete documentation index at: https://morphik.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# list_folders

> List all folders available to the client

> [tab] Sync
>
> ```python theme={null}
> def list_folders() -> List[Folder]
> ```

> [tab] Async
>
> ```python theme={null}
> async def list_folders() -> List[Folder]
> ```

## Returns

* `List[Folder]`: Collection of folders the current auth context can access.

Each `Folder` now surfaces hierarchy details:

* `full_path`: Canonical path (e.g., `/projects/alpha/specs`)
* `parent_id`: Parent folder ID (if any)
* `depth`: Depth in the tree (root = 1)
* `child_count`: Number of direct children when provided

## Examples

> [tab] Sync
>
> ```python theme={null}
> from morphik import Morphik
>
> db = Morphik()
>
> for folder in db.list_folders():
>     print(folder.name, folder.id)
> ```

> [tab] Async
>
> ```python theme={null}
> from morphik import AsyncMorphik
>
> async with AsyncMorphik() as db:
>     folders = await db.list_folders()
>     for folder in folders:
>         print(folder.name, folder.id)
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.