drive_ensure_folder_path
Ensure a Google Drive folder path exists, creating missing folders as needed. Returns the leaf folder's ID, safe to retry.
Instructions
Create a folder path if it doesn't exist, and return the leaf's id.
Idempotent mkdir -p for Drive: calling it twice with the same path
creates nothing the second time and returns the same id, so it is safe
for an agent to retry. Only folders are created — this never creates a
file.
path is slash-separated from your My Drive root, e.g.
Career/consulting/clients/acme. Every segment that already exists is
reused; a segment that matches two existing folders is an error rather
than a guess, since continuing would build the rest of the path under an
arbitrary one of them.
Returns the leaf folder's id and path, plus created, the list of
segments that had to be made (empty when the path already existed).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||