> ## Documentation Index
> Fetch the complete documentation index at: https://docs.montra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# update_document

> Replace the title and/or summary of a Montra document.

Replaces a document's title, its summary, or both. This overwrites whatever is stored, including text a person wrote in the app, so read the document with [`get_document`](/tools/get-document) first and only write when you mean to replace what is there.

## Input

<ParamField body="documentId" type="string (uuid)" required>
  Id of the document to update.
</ParamField>

<ParamField body="title" type="string">
  New title. Replaces the existing title. Surrounding whitespace is trimmed; 1 to 200 characters after trimming.
</ParamField>

<ParamField body="summary" type="string">
  New summary. Replaces the existing summary; pass an empty string to clear it. Maximum 2000 characters.
</ParamField>

## Output

<ResponseField name="document" type="object" required>
  <Expandable title="properties">
    <ResponseField name="id" type="string" required>Document id.</ResponseField>
    <ResponseField name="title" type="string" required>Title after the update.</ResponseField>
    <ResponseField name="summary" type="string" required>Summary after the update.</ResponseField>
    <ResponseField name="status" type="string" required>Document status.</ResponseField>
    <ResponseField name="folderId" type="string" required>Id of the folder holding this document. `null` when the document is not in a folder.</ResponseField>
    <ResponseField name="workspaceId" type="string" required>Id of the workspace the document belongs to.</ResponseField>
    <ResponseField name="updatedAt" type="string" required>When the document was last updated.</ResponseField>
  </Expandable>
</ResponseField>

## Notes

* Pass at least one of `title` or `summary`. A call with neither is rejected.
* Fields you leave out are untouched. Fields you pass are replaced outright — there is no merge or append, and human edits are overwritten like any other value.
* A document outside the bound workspace reads as not found and is never written to.
