Create a document or folder
doc_createCreate something that is not there yet. Commits at once if your grant allows it and is refused if it does not; nothing is overwritten. If the top-level folder does not exist and you may create folders, it is created and you become its manager. The answer says what it created, names any new directory (a typo in folder_path makes one), lists what each [[Name]] link resolved to, and carries the node id and a console link. Frontmatter (type, tags, aliases) between --- lines at the top of content drives search; access comes from grants on the folders, never from frontmatter. Actions — document: a document in a folder (folder_path, name, content); refused when one is already there. A name ending .svg stores content as an image a document beside it links as . folder: a folder (folder_path); if your own access includes manager there, you can also share it with access_grant action=share. upload: files of any type, without typing their bytes (folder_path, entries: one {path, sha256, size} per file, delete, file). Each path answers unchanged, upload (a one-time url: curl -T ''), stored or refused; what arrived lands as one commit, a .docx is stored as markdown, and the same entries again send only what changed. delete: true removes what folder_path holds that entries leaves out. An entry may carry source_url (https) or data (a data: URI) instead.
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": {
"action": "<action>"
},
"name": "doc_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | upload: a file ChatGPT attached, as it hands it to the tool; stored under its file_name | |
| name | No | document: the document name, e.g. "Q3 summary.md". Cannot contain "/" — put folders in folder_path instead. END IT IN .md unless you mean otherwise: only .md and .mdx render in the console, and anything else opens as plain text with no way to switch. Nothing is appended for you. | |
| seat | No | the seat token identity_write action=take_seat gave you; pass it on every call while you drive that agent, and each call that carries it keeps the seat yours for a whole lease from that call | |
| action | Yes | what to do; each action takes the arguments its line names | |
| delete | No | upload: true to delete what folder_path holds that entries leaves out (rsync --delete); undoable | |
| content | No | document: the whole document. Set metadata with YAML frontmatter at the top of `content`: `type` (one of: meeting-notes, playbook, spec, brand-asset, web-clip, contract, misc — anything else becomes misc), `title`, `summary`, and `tags` as a list. `tags` is the write-side spelling of what the listing tools call `label`. `status` takes `active` or `inactive` and is not a label: `inactive` retires a document — search and listings stop showing it, while whoever may write it still opens it by location or node, and removing the line brings it back. Omit it unless you mean to retire something. `aliases` (a list, or one name) are other names search how=titles finds the document by; a [[link]] still needs its file name or title. Any other key you write (`sources`, …) is kept as written and comes back on read; key order may change. A block that does not parse as YAML is refused, naming the line, and nothing is written: quote a value that contains ": " (summary: "a: b"). | |
| entries | No | upload: the files, one {path, sha256, size} each (at most 1000, 100 MB a file, 1 GB in all); a file unchanged since its last upload is not sent again | |
| acting_as | No | an agent identity below you, or one working in a folder you can write (pass its seat too), by its id (from identity_write action=spawn) or its @handle (brief_me lists your agents with both), to make this one call as, with that agent's narrower access; for a helper whose session signs in as its person | |
| folder_path | No | document, upload: folder names, outermost first, e.g. ["handbook","policies"]; at least one, since documents go in a folder · folder: folder names, outermost first, e.g. ["product-docs"] or ["product-docs","specs"] | |
| idempotency_key | No | Any unique string you choose for this write, e.g. a UUID. If you retry the call with the same key and the same arguments, the first answer is returned and nothing is done twice. Reusing a key for a different request is refused. Keys are kept 24 hours. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sync | No | open until every upload URL has its bytes, then committed as one; at expires_at what arrived is committed | |
| text | No | the answer as prose, for an action that answers in prose | |
| files | No | ||
| spans | No | the blocks this write added or edited, in document order; absent when no commit was written | |
| action | Yes | the action that answered | |
| commit | No | the commit this call landed, when nothing was left to send | |
| stored | No | what the document's head stores after this call, to check against what was sent (#1492) | |
| deleted | No | ||
| location | No | the whole path from the workspace root this write resolved to; present on a successful write | |
| destination | No | ||
| remote_only | No | files folder_path holds that entries leaves out, relative to it | |
| delete_refused | No | ||
| remote_only_more | No |