Drive

list-drive-folders-tool

Browse the drive folders you can see, to place a new document or narrow a search.

Returns a paginated list of the drive folders the authenticated user can see. Use it to resolve a folder_id before creating a document somewhere specific, or to narrow list-drive-documents-tool.

Every row carries a full slash-separated path, so folders that share a name stay distinguishable.

Inputs

NameTypeRequiredDescription
searchstringnoCase-insensitive substring match on the folder name.
customer_idintegernoFolders owned by this customer or by any project under it.
project_idintegernoFolders owned by this project.
personalbooleannoFolders in the caller's own personal drive.
organizationbooleannoFolders in the organisation-wide drive.
parent_idintegernoOnly the direct children of this folder.
root_onlybooleannoOnly top-level folders.
limitintegernoPage size, 1–100, default 25.
offsetintegernoNumber of rows to skip, default 0.

Permissions

The same drive access permissions as list-drive-documents-tool, applied per folder. A restricted folder the caller has no grant on is neither listed nor counted.

Example

{
  "project_id": 7
}

Response

{
  "data": [
    {
      "id": 12,
      "name": "Drafts",
      "path": "Docs/Specs/Drafts",
      "parent_id": 9,
      "owner": { "type": "project", "id": 7, "name": "ACME website" },
      "access": "edit"
    }
  ],
  "pagination": {
    "total": 1,
    "limit": 25,
    "offset": 0,
    "has_more": false,
    "truncated": false
  }
}

Creating a document inside a folder requires "access": "edit" on that folder, not just "view".

Errors

  • A caller with no drive access permission at all returns an authorization error.
  • An out-of-range limit (less than 1 or greater than 100) returns a validation error.

On this page