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

# Attention: List Library Folders

> List the folders in the Attention library, or the subfolders of one folder. Includes SDK V2 examples, input constraints, response fields, and Deepline cost.

List the folders in the Attention library, or the subfolders of one folder.

> [!NOTE]
>
> Tool ID: `attention_list_library_folders`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'attention_list_library_folders',
  {
    "userUUID": "user_123"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute attention_list_library_folders --input '{
  "userUUID": "user_123"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "data": {
      "uuid": "uuid_123",
      "name": "Example",
      "path": "example"
    }
  }
}
```

Use `deepline describe attention_list_library_folders --json` for the latest machine-readable contract.

## Input reference

Retrieves the folder structure for the library. If folderUUID is provided, returns only the direct subfolders of that folder. If folderUUID is not provided, returns the root folder structure. This endpoint supports lazy loading of folder hierarchies for workflow builders.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.userUUID` | `string` | Yes | — | UUID of the user. Required to fetch folder structure. |
| `payload.folderUUID` | `string` | No | — | UUID of the folder to fetch subfolders from. If not provided, returns root folder structure. When provided, returns only direct subfolders of the specified folder. |
| `payload.myLibrary` | `boolean` | No | `false` | If true, returns only the user's personal library folders. If false, returns organization-level library folders. |
| `payload.includeHidden` | `boolean` | No | `false` | If true, includes hidden folders in the response. Default is false. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Retrieves the folder structure for the library. If folderUUID is provided, returns only the direct subfolders of that folder. If folderUUID is not provided, returns the root folder structure. This endpoint supports lazy loading of folder hierarchies for workflow builders.",
    "properties": {
      "userUUID": {
        "type": "string",
        "description": "UUID of the user. Required to fetch folder structure."
      },
      "folderUUID": {
        "type": "string",
        "description": "UUID of the folder to fetch subfolders from. If not provided, returns root folder structure. When provided, returns only direct subfolders of the specified folder."
      },
      "myLibrary": {
        "type": "boolean",
        "description": "If true, returns only the user's personal library folders. If false, returns organization-level library folders.",
        "default": false
      },
      "includeHidden": {
        "type": "boolean",
        "description": "If true, includes hidden folders in the response. Default is false.",
        "default": false
      }
    },
    "required": [
      "userUUID"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.data` | `object` | No | — | — |
| `result.data.data.uuid` | `string` | No | — | Unique identifier of the folder |
| `result.data.data.name` | `string` | No | — | Name of the folder |
| `result.data.data.path` | `string` | No | — | Full path to the folder from root |
| `result.data.data.parentUUID` | `string` | No | — | UUID of the parent folder, empty if root |
| `result.data.data.hidden` | `boolean` | No | — | Whether the folder is hidden |
| `result.data.data.userUUID` | `string` | No | — | UUID of the user who owns this folder (for personal library folders) |
| `result.data.data.organizationUUID` | `string` | No | — | UUID of the organization this folder belongs to |
| `result.data.data.subFolders` | `array` | No | — | List of immediate subfolders |
| `result.data.data.subFolders[].uuid` | `string` | No | — | Unique identifier of the subfolder |
| `result.data.data.subFolders[].name` | `string` | No | — | Name of the subfolder |
| `result.data.data.subFolders[].parentUUID` | `string` | No | — | UUID of the parent folder |
| `result.data.data.subFolders[].hidden` | `boolean` | No | — | Whether the subfolder is hidden |
| `result.data.data.subFolders[].totalElements` | `integer` | No | — | Total number of elements (snippets) in this folder Format: `int64`. |
| `result.data.data.subFolders[].totalFolders` | `integer` | No | — | Total number of nested subfolders Format: `int64`. |
| `result.data.data.subFoldersTotal` | `integer` | No | — | Total number of subfolders Format: `int64`. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "uuid": {
                "type": "string",
                "description": "Unique identifier of the folder"
              },
              "name": {
                "type": "string",
                "description": "Name of the folder"
              },
              "path": {
                "type": "string",
                "description": "Full path to the folder from root"
              },
              "parentUUID": {
                "type": "string",
                "description": "UUID of the parent folder, empty if root"
              },
              "hidden": {
                "type": "boolean",
                "description": "Whether the folder is hidden"
              },
              "userUUID": {
                "type": "string",
                "description": "UUID of the user who owns this folder (for personal library folders)"
              },
              "organizationUUID": {
                "type": "string",
                "description": "UUID of the organization this folder belongs to"
              },
              "subFolders": {
                "type": "array",
                "description": "List of immediate subfolders",
                "items": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "description": "Unique identifier of the subfolder"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of the subfolder"
                    },
                    "parentUUID": {
                      "type": "string",
                      "description": "UUID of the parent folder"
                    },
                    "hidden": {
                      "type": "boolean",
                      "description": "Whether the subfolder is hidden"
                    },
                    "totalElements": {
                      "type": "integer",
                      "description": "Total number of elements (snippets) in this folder",
                      "format": "int64"
                    },
                    "totalFolders": {
                      "type": "integer",
                      "description": "Total number of nested subfolders",
                      "format": "int64"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "subFoldersTotal": {
                "type": "integer",
                "description": "Total number of subfolders",
                "format": "int64"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Attention provider guide](https://deepline.com/docs/providers/attention/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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