library_context_prepare
Append a user turn and return a bounded semantic-paging envelope for subsequent model calls, structuring context within token limits.
Instructions
Durably append a user turn, then return the complete bounded semantic-paging envelope for the next model call. Send only the returned messages to the model.
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": {
"user_message": "<user_message>"
},
"name": "library_context_prepare"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| focus | No | ||
| event_id | No | Optional caller idempotency key for this turn. | |
| metadata | No | JSON catalog metadata or exact-match catalog filters. | |
| max_books | No | ||
| protected | No | ||
| collection | No | Optional library collection/namespace; defaults to the configured collection. | |
| importance | No | ||
| session_id | No | codex | |
| token_budget | No | ||
| user_message | Yes | ||
| system_prompt | No | ||
| strict_freshness | No | ||
| recent_token_budget | No | ||
| protected_token_budget | No |