> ## 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

<Tabs>
  <Tab title="Sync">
    ```python theme={null}
    def list_folders() -> List[Folder]
    ```
  </Tab>

  <Tab title="Async">
    ```python theme={null}
    async def list_folders() -> List[Folder]
    ```
  </Tab>
</Tabs>

## 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

<Tabs>
  <Tab title="Sync">
    ```python theme={null}
    from morphik import Morphik

    db = Morphik()

    for folder in db.list_folders():
        print(folder.name, folder.id)
    ```
  </Tab>

  <Tab title="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)
    ```
  </Tab>
</Tabs>
