Read Chat Logs
get_chat_logsBrowse archived AI chats page by page or open a selected chat to read a message range, short summary, or metadata—use it after searching to inspect a matching conversation.
Instructions
List archived chats, or read one chat as a message range, a short summary, or metadata. Use it after search_history to open a hit, or with no chat_id to browse the archive page by page. To search by topic use search_history instead. Without chat_id: returns a page header '[Page N of M (Total chats: T)]' followed by file names. With chat_id: view_type 'content' returns messages start_msg..end_msg as plain text with a '... of N total' header, truncating each message to max_msg_len characters and collapsing code blocks to one-line summaries unless summarize_code=false; 'summary' returns the opener and closer; 'metadata' returns {file_name, title, message_count, file_size_bytes, last_modified, saved_at, client}. Older chats are shown pruned to save tokens. Keep ranges small (the default is 20 messages): max_msg_len=0 with a wide range can return a whole transcript. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (1-based) when listing chats without chat_id. | |
| 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 |
| chat_id | No | Chat file or chunk id to read, such as 'my-chat.json' or 'my-chat__part_2.json'. Omit to list chats. | |
| end_msg | No | Last message to return (inclusive) for view_type='content'. | |
| per_page | No | Chats per page when listing without chat_id. | |
| start_msg | No | First message to return (1-based) for view_type='content'. | |
| view_type | No | What to return for chat_id: message text ('content'), file statistics ('metadata') or a short 'summary'. | content |
| max_msg_len | No | Per-message character cap for view_type='content'; 0 means no cap (can be very large). | |
| summarize_code | No | Replace fenced code blocks with a one-line language and line-count summary to save tokens. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |