Write an AI Coach memo
write_ai_coach_noteCreate, replace, or append Markdown memos in AI Coach, organizing them into groups. Uses conflict detection to avoid overwriting user edits.
Instructions
Create a memo in AI Coach, replace one, or append to one. The memo is a plain Markdown file on the user's own machine and shows up in the AI Coach memo list immediately. Pass 'group' when creating to file it under a group (a folder); the group is created if it does not exist. Use mode 'create' for a new memo, 'replace' to rewrite an existing one and 'append' to add to the end (also how you write a body larger than the per-call limit). When changing an existing memo, first read it and pass its modifiedAt as expectedModifiedAt so a memo the user edited meanwhile is not overwritten. AI Coach asks the user to confirm the change on their screen, so the call can take a few seconds; if it comes back with note_confirmation_denied, the user declined it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | create (a new memo, the default) / replace (overwrite the whole body) / append (add to the end). For a body over the size limit, create it first and then append the rest. | |
| group | No | Group to create the memo in. It is created if it does not exist. Ungrouped when omitted. | |
| title | No | File name to use for create. Derived from the first line of the body when omitted. | |
| locale | No | Display language hint (BCP 47). The dashboard view passes hostContext.locale through unchanged. | |
| noteId | No | Target of replace / append. It cannot be given for create. | |
| content | Yes | Markdown body (up to 32768 bytes per call). | |
| idempotencyKey | No | Key that keeps a resent write from being applied twice. The server generates one when omitted. | |
| expectedModifiedAt | No | The modifiedAt returned by read. When given, the write stops with note_conflict instead of overwriting if the user or another tool changed the memo first. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hits | No | ||
| note | No | ||
| error | No | ||
| notes | No | ||
| total | No | ||
| groups | No | ||
| offset | No | ||
| deleted | No | ||
| written | No | ||
| updatedAt | Yes | ||
| connection | Yes | ||
| folderName | No | ||
| protocolVersion | Yes |