openclaw_chat_history
Retrieve the chat history for a specific session by providing the session key. Use the optional limit parameter to control the number of messages returned.
Instructions
Fetch chat history for a session. Wraps chat.history. Wire format (verified live): requires sessionKey; accepts limit. Read-only. The pre-0.5.x agentId/sessionId/offset fields are rejected.
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": {
"sessionKey": "<sessionKey>"
},
"name": "openclaw_chat_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| instance | No | Optional OpenClaw instance to route this call to (e.g. 'default', 'work'). Falls back to the active default instance, or the OPENCLAW_GATEWAY_URL/TOKEN env vars when set. List configured instances with openclaw_setup_list. | |
| sessionKey | Yes | Composite session key from openclaw_sessions_list. |