create-drive-document-tool
Create a new drive document on a customer, project, the organisation drive, or your personal drive.
Creates a document and returns it in the same shape get-drive-document-tool uses, so one call is enough to confirm what was written.
The body is GitHub-Flavored Markdown by default: headings, lists, task lists (- [ ]), tables, code fences, blockquotes, links and images all survive into the editor.
The caller becomes the document's creator, which means they keep edit access to it even if the document is later restricted.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
owner | string | yes | Which drive: customer, project, organization or personal. |
owner_id | integer | conditional | The customer or project id. Required for customer and project; ignored otherwise. |
title | string | yes | Document title, up to 255 characters. |
content | string | no | Body, up to 262144 characters. Omit for an empty document. |
format | string | no | Format of content: markdown (default) or html. |
folder_id | integer | no | Folder to create the document in. Omit to create at the drive root. |
Permissions
The caller needs the create permission for the chosen drive: project_drive::create, customer_drive::create, organization_drive::create or user_drive::create. Read access alone is not enough.
A folder_id must belong to the same owner and be a folder the caller can edit, not merely view — otherwise a caller could file a document inside a folder they are not allowed to see. Use list-drive-folders-tool and check "access": "edit".
The permission is checked before the owner is looked up, and a missing owner returns the same error as a forbidden one, so this tool cannot be used to discover which customers or projects exist.
Example
{
"owner": "project",
"owner_id": 7,
"title": "Kickoff notes",
"content": "# Agenda\n\n- [ ] Introductions\n- [x] Budget sign-off\n",
"folder_id": 12
}Response
The full document snapshot, identical to get-drive-document-tool, including the rendered body and a version token.
Errors
- A caller without the matching
…_drive::createpermission returns an authorization error. - A
folder_idin another owner's drive, or one the caller cannot edit, returns an authorization error and nothing is written. - An
owner_idthat does not exist returns an authorization error. - Omitting
owner_idforowner: "customer"orowner: "project"returns a validation error.