Manage Session State
manage_session_statePersist current conversations with save or auto-save, merge new messages into archived history, export Markdown, delete with confirmation, and watch folders for new or modified files.
Instructions
Save, auto-save, merge, export or delete archived conversations, and watch the archive for changes. Use it to persist the current conversation; to import outside history use sync_workspace_data. action 'register_auto_save': remember conversation_name and messages so they are written when the client disconnects (call it early and re-call it to refresh). 'trigger_auto_save': write the registered session now. 'save': write messages to <conversation_name>.json, overwriting a chat with that name; below the auto_save_message_threshold (default 20) it is skipped unless force_save=true. 'merge': append new_messages to file_name, skipping duplicates. 'export_markdown': write exports/.md. 'delete': permanently delete file_name; refused unless confirm=true, so ask the user first. 'watch_folder': report {new_files, modified_files, total_tracked} since the last call (only updates the watch checkpoint). Returns a confirmation string, or the report object for 'watch_folder'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Operation to perform (see the tool description). | |
| client | No | Archive namespace (a subfolder of the chats directory). Built-in: 'default', 'cursor', 'chatgpt', 'claude'; any other name creates its own subfolder. Omit to use 'default'. | default |
| confirm | No | Must be true for 'delete' to proceed; deletion is permanent. | |
| messages | No | Chat messages as objects with 'role' ('user', 'assistant' or 'system') and 'content' (text). 'text' is accepted in place of 'content'; extra keys such as 'timestamp' are kept. | |
| file_name | No | Existing chat file for 'merge', 'export_markdown' and 'delete', such as 'my-chat.json'. | |
| force_save | No | For 'save': write even when the message count is below the auto-save threshold. | |
| new_messages | No | Messages to append for 'merge' (same shape as 'messages'); falls back to 'messages'. | |
| conversation_name | No | Conversation title for 'save' and 'register_auto_save' (also the file name); used as file_name for other actions when file_name is omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |