get_session_history
Retrieves paginated message history from a durable session record, including user and assistant messages with attachment metadata, so you can review prior conversation context.
Instructions
Message history of a session, read from the durable record and paginated with before/limit/next_before (user/assistant messages only; attachments as metadata) — see below
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": {
"session_id": "<session_id>"
},
"name": "get_session_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Messages per page, newest before the cursor; defaults to 50, maximum 100 | |
| before | No | Pagination cursor: use the previous page's next_before value unchanged | |
| session_id | Yes | Session ID returned by chat_with_agent or list_agent_sessions |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | No | ||
| agent_id | No | ||
| messages | No | ||
| session_id | No | ||
| message_count | No | ||
| messages_before_cursor | No |