update_document
Overwrite an entire Markdown document in a mind map with new full content, using the prior read timestamp to prevent concurrent-edit conflicts.
Instructions
マップにあるMD文書(Markdown)の中身を、新しい中身で丸ごと上書きする(一部だけの差し替えはできない。直す前にread_documentで今の中身を読み、直した全文をcontentに渡すこと)。文書の要素の位置・日付・チェックは変わらない。文書を作り直して古い方を消す必要はない。documentIdは、list_elementsが返す文書の要素のdocument.documentId。contentはUTF-8で1000000バイトまで(超えると何も書かずにエラーを返す)。titleを省略すると、新しい中身の最初の見出し(# の行)、無ければ最初の行が行のタイトルになる。baseUpdateTimeには、直前のread_documentが返したupdateTimeをそのまま渡す(必須)。read_documentで読んだあとにアプリなどで文書が変わっていた場合は、何も書かずにエラーを返す(自動ではやり直さない)ので、read_documentで読み直し、最新の中身をもとに直してやり直すこと。
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": {
"mapId": "<mapId>",
"documentId": "<documentId>",
"baseUpdateTime": "<baseUpdateTime>",
"content": "<content>"
},
"name": "update_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mapId | Yes | list_mapsで得たマップのID | |
| title | No | 行に見せるタイトル。省略するとcontentの最初の見出しから決める | |
| content | Yes | 書き換え後の文書の全文(Markdown) | |
| documentId | Yes | list_elementsで得た、文書の要素のdocument.documentId | |
| baseUpdateTime | Yes | 直前のread_documentが返したupdateTime。これと違えば(読んだあとに変更されていれば)書かずにエラー |