Drive

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

NameTypeRequiredDescription
ownerstringyesWhich drive: customer, project, organization or personal.
owner_idintegerconditionalThe customer or project id. Required for customer and project; ignored otherwise.
titlestringyesDocument title, up to 255 characters.
contentstringnoBody, up to 262144 characters. Omit for an empty document.
formatstringnoFormat of content: markdown (default) or html.
folder_idintegernoFolder 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::create permission returns an authorization error.
  • A folder_id in another owner's drive, or one the caller cannot edit, returns an authorization error and nothing is written.
  • An owner_id that does not exist returns an authorization error.
  • Omitting owner_id for owner: "customer" or owner: "project" returns a validation error.

On this page