sensing_record_turn
Record a conversation turn to detect topic shifts. Use the returned flag to trigger context injection when needed.
Instructions
Record a completed conversation turn (user message + Claude reply). Call this after every exchange. Survives server restarts — keep using the same session_id even if the server reconnected mid-conversation. Returns whether a topic shift was detected — if true, call your context injection tool.
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>",
"sequence": "<sequence>",
"user_message": "<user_message>",
"claude_reply": "<claude_reply>"
},
"name": "sensing_record_turn"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sequence | Yes | Turn number within the session, starting at 1 | |
| session_id | Yes | Session identifier from sensing_start_session | |
| claude_reply | Yes | The full Claude reply text | |
| user_message | Yes | The full user message text | |
| files_touched | No | Files read or modified during this turn | |
| injected_memory_ids | No | IDs of memories Control injected before this turn, for feedback scoring |