retrieve_recent_context
Retrieve recent dialog turns from a session in chronological order to provide contextual history for LLM conversations.
Instructions
Retrieve the most recent dialog turns for a session.
Returns turns in chronological order (oldest first) so they can be directly used as LLM context.
Args: session_id: Conversation session to query. limit: Maximum number of recent turns to return (default 10).
Returns: JSON string with session id, turn count, and turn list.
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": "retrieve_recent_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| session_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |