Skip to main content
Glama

Create a document or folder

doc_create

Create 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 alt. 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

NameRequiredDescriptionDefault
fileNoupload: a file ChatGPT attached, as it hands it to the tool; stored under its file_name
nameNodocument: 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.
seatNothe 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
actionYeswhat to do; each action takes the arguments its line names
deleteNoupload: true to delete what folder_path holds that entries leaves out (rsync --delete); undoable
contentNodocument: 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").
entriesNoupload: 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_asNoan 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_pathNodocument, 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_keyNoAny 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

NameRequiredDescriptionDefault
syncNoopen until every upload URL has its bytes, then committed as one; at expires_at what arrived is committed
textNothe answer as prose, for an action that answers in prose
filesNo
spansNothe blocks this write added or edited, in document order; absent when no commit was written
actionYesthe action that answered
commitNothe commit this call landed, when nothing was left to send
storedNowhat the document's head stores after this call, to check against what was sent (#1492)
deletedNo
locationNothe whole path from the workspace root this write resolved to; present on a successful write
destinationNo
remote_onlyNofiles folder_path holds that entries leaves out, relative to it
delete_refusedNo
remote_only_moreNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / seat / description
      Previous value: -"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 its lease"New value: +"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"
  2. Changed1 schema field changed
    • changedInput schema / properties / acting_as / description
      Previous value: -"an agent identity below you, 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"New value: +"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"
  3. Changed5 schema fields changed
    • removedOutput schema / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / files / items / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / spans / items / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / stored / additionalProperties
      Removed value: -false
    • changedOutput schema / properties / sync / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "expires_at": {
      -        "type": "string"
      -      },
      -      "id": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "id",
      -      "expires_at"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "expires_at": {
      +        "type": "string"
      +      },
      +      "id": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "expires_at"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  4. Changed2 schema fields changed
    • changedInput schema / properties / acting_as / description
      Previous value: -"an agent identity below you (its id, from identity_write action=spawn) to make this one call as, with that agent's narrower access; for a helper whose session signs in as its person"New value: +"an agent identity below you, 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"
    • changedInput schema / properties / seat / description
      Previous value: -"the seat token identity_write action=take_seat gave you; pass it on every call while you drive that agent"New value: +"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 its lease"
  5. Changed1 schema field changed
    • addedOutput schema / properties / spans
      Added value: +{
      +  "description": "the blocks this write added or edited, in document order; absent when no commit was written",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "change": {
      +        "description": "added: a new block; edited: an existing block given new text, same id",
      +        "enum": [
      +          "added",
      +          "edited"
      +        ],
      +        "type": "string"
      +      },
      +      "id": {
      +        "description": "the span id: what truth, comment and claim anchor to",
      +        "type": "string"
      +      },
      +      "index": {
      +        "description": "the block's position in the document's new head, 0-based",
      +        "maximum": 9007199254740991,
      +        "minimum": -9007199254740991,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "index",
      +      "change"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  6. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  7. Changed1 schema field changed
    • changedInput schema / properties / content / description
      Previous value: -"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 — it stays in the folder and stays openable in the console, but agents stop retrieving it. 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\")."New value: +"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\")."
  8. Changed1 schema field changed
    • addedOutput schema / properties / location
      Added value: +{
      +  "description": "the whole path from the workspace root this write resolved to; present on a successful write",
      +  "type": "string"
      +}
  9. Changed3 schema fields changed
    • addedInput schema / properties / seat
      Added value: +{
      +  "description": "the seat token identity_write action=take_seat gave you; pass it on every call while you drive that agent",
      +  "maxLength": 64,
      +  "type": "string"
      +}
    • removedOutput schema / properties / commit / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / commit / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  10. Changed14 schema fields changed
    • addedInput schema / properties / acting_as
      Added value: +{
      +  "description": "an agent identity below you (its id, from identity_write action=spawn) to make this one call as, with that agent's narrower access; for a helper whose session signs in as its person",
      +  "type": "string"
      +}
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "document",
      -  "folder"
      -]New value: +[
      +  "document",
      +  "folder",
      +  "upload"
      +]
    • addedInput schema / properties / delete
      Added value: +{
      +  "description": "upload: true to delete what folder_path holds that entries leaves out (rsync --delete); undoable",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / entries
      Added value: +{
      +  "description": "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",
      +  "items": {
      +    "properties": {
      +      "data": {
      +        "description": "the bytes inline as a data: URI, for a file under 256 KB",
      +        "type": "string"
      +      },
      +      "mimeType": {
      +        "description": "its media type, e.g. image/png; guessed from the extension when absent",
      +        "type": "string"
      +      },
      +      "path": {
      +        "description": "where the file goes, relative to folder_path, e.g. figure.svg or img/photo.png",
      +        "type": "string"
      +      },
      +      "sha256": {
      +        "description": "the file's SHA-256 as 64 hex characters (sha256sum / shasum -a 256); needed unless data or source_url brings the bytes",
      +        "type": "string"
      +      },
      +      "size": {
      +        "description": "the file's length in bytes; needed with sha256",
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "source_url": {
      +        "description": "an https URL the server fetches the bytes from instead",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "path"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / file
      Added value: +{
      +  "description": "upload: a file ChatGPT attached, as it hands it to the tool; stored under its file_name",
      +  "properties": {
      +    "download_url": {
      +      "type": "string"
      +    },
      +    "file_id": {
      +      "type": "string"
      +    },
      +    "file_name": {
      +      "type": "string"
      +    },
      +    "mime_type": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "download_url"
      +  ],
      +  "type": "object"
      +}
    • changedInput schema / properties / folder_path / description
      Previous value: -"document: 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\"]"New value: +"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\"]"
    • addedOutput schema / properties / commit
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "the commit this call landed, when nothing was left to send"
      +}
    • addedOutput schema / properties / delete_refused
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / deleted
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / destination
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / files
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "answer": {
      +        "enum": [
      +          "unchanged",
      +          "upload",
      +          "received",
      +          "stored",
      +          "refused"
      +        ],
      +        "type": "string"
      +      },
      +      "expires_at": {
      +        "type": "string"
      +      },
      +      "link": {
      +        "description": "the markdown a document beside it links it with",
      +        "type": "string"
      +      },
      +      "location": {
      +        "description": "where it is stored; a .docx becomes .md",
      +        "type": "string"
      +      },
      +      "max_size": {
      +        "type": "number"
      +      },
      +      "method": {
      +        "type": "string"
      +      },
      +      "path": {
      +        "type": "string"
      +      },
      +      "reason": {
      +        "description": "refused: why",
      +        "type": "string"
      +      },
      +      "sha256": {
      +        "type": "string"
      +      },
      +      "url": {
      +        "description": "upload: PUT the file's bytes here, e.g. curl -T <file> '<url>'",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "path",
      +      "answer"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / remote_only
      Added value: +{
      +  "description": "files folder_path holds that entries leaves out, relative to it",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / remote_only_more
      Added value: +{
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / sync
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "expires_at": {
      +          "type": "string"
      +        },
      +        "id": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "expires_at"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "open until every upload URL has its bytes, then committed as one; at expires_at what arrived is committed"
      +}
  11. Changed1 schema field changed
    • addedOutput schema / properties / stored
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "what the document's head stores after this call, to check against what was sent (#1492)",
      +  "properties": {
      +    "bytes": {
      +      "description": "the stored body's length in UTF-8 bytes; frontmatter is kept beside the body, not in it",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "previousBytes": {
      +      "anyOf": [
      +        {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "the length of the body this replaced; null when nothing was there"
      +    },
      +    "sha256": {
      +      "description": "the stored body's sha256, hex",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "bytes",
      +    "sha256",
      +    "previousBytes"
      +  ],
      +  "type": "object"
      +}
  12. Added

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations, it discloses permission gating, auto-creation of a missing top-level folder and the resulting manager role, the shape of the answer, frontmatter/search/access semantics, the .svg image trick, and upload behavior (one-time URL, .docx converted to markdown, incremental re-send). The one tension is that `delete: true` removes files while destructiveHint is false, though the description explicitly labels that delete "undoable", which softens the mismatch rather than contradicting it outright.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Almost every sentence carries real information, but the ordering is poor: permissions, response shape, and frontmatter arrive before the three actions an agent must choose between. Some clauses are dense to the point of being cryptic, e.g. "Each path answers unchanged, upload (a one-time url: curl -T <file> '<url>'), stored or refused".

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter, multi-action mutation tool with nested entry objects, the definition covers permission failures, folder auto-creation, frontmatter validation errors, and upload semantics well. It is somewhat redundant on return values despite an output schema existing, and it omits any explanation of seat/acting_as, which remain schema-only.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema coverage the baseline is 3, but the description adds cross-parameter meaning the schema does not: which arguments belong to which action, that folder names must go in folder_path and not `name`, that `.md` is required for rendering, and that a typo in folder_path silently creates a new directory. It stops short of clarifying seat, acting_as, or idempotency_key, which live only in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening line ("Create something that is not there yet") is vague, but the Actions block names three concrete verbs and resources: document, folder, and upload, each with its argument list. It also signals its boundary against doc_update/doc_delete by stating "nothing is overwritten" and that a document action is "refused when one is already there".

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear per-action conditions: pick document for a file in a folder, folder to create a directory, upload for bytes of any type, and it explains prerequisite access ("commits at once if your grant allows it and is refused if it does not"; manager access needed to share). It never explicitly names doc_update as the tool to use instead when a document already exists, leaving that inference to the reader.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources