Drive as a filesystem
driveNavigate and reorganize Google Workspace files, Docs tabs, and shared folders using shell-style ls, find, mkdir, cp, and mv commands.
Instructions
Navigate and reorganise Google Drive with shell commands: ls, find, mkdir, cp, mv. Arguments are positional and follow the usual shell forms. ls [path] — list a folder (default My Drive root). find [-type d|f] — search everything by name, including files no path can reach. mkdir [-p] — create a folder. cp — duplicate a file (preserves headers/footers, image sizing and exact formatting, which a markdown round-trip cannot rebuild). mv — move and/or rename, as on a filesystem: an existing folder as means "into it", anything else means "to that name". Paths start with / or ~ (My Drive); /shared/ is a shared drive, /shared-with-me the files others shared with you, and /lost+found the files you own that are in no folder at all. Anything not starting with / or ~ is read as a Drive id or URL, so ids from any other tool can be pasted straight in. Drive permits two files with the same name in one folder and folds case when matching, unlike any real filesystem — a path that matches more than one thing is refused with the candidates listed, never guessed. A doc is a folder of tabs: ls lists its tabs, ls shows each doc with its tab count, and a path continues into tabs (/Work/Contract/Part 2/Ch.4; a tab step may also be a tabId). mv on a tab renames it, nests it (dst is another tab, or a new name under one) or un-nests it (dst is the doc), and index reorders it; a tab cannot leave its doc, and cp of a tab is refused. Content is edited with edit_doc and written with write_doc, not here; there is no rm, and nothing here deletes a tab. A tab is made by write_doc to a new path.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"cmd": "<cmd>"
},
"name": "drive"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cmd | Yes | ||
| args | No | positional arguments for cmd, e.g. ["/Work/Roof", "/Archive"] for mv | |
| index | No | mv of a tab only: its position among its new siblings, 0 first. Without it a tab keeps its place, or goes first when nested. | |
| account | No | Google account email to use. Defaults to GDOCS_DEFAULT_ACCOUNT, or the sole account. | |
| expectName | No | mv only: the name the source is expected to have; the move is refused if it resolved to something else | |
| acceptOwnershipTransfer | No | mv only: required to move into /shared/… , which hands ownership to that drive's organisation and cannot be undone |