d8a_prepare_ai_context_change
Prepare an AI context change without saving it. mode is replace_instructions, add_fact, edit_fact (needs fact_id) or delete_fact (needs fact_id and lock_version, with an empty text). text is always the complete new text; for replace_instructions an empty string clears the instructions. Show the user the complete before and after text, including the full text of a fact being deleted, and the warnings, ask them to approve, then call d8a_execute_change. Other saved facts are kept.
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": {
"property_id": "<property_id>",
"mode": "<mode>",
"text": "<text>"
},
"name": "d8a_prepare_ai_context_change"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | replace_instructions, add_fact, edit_fact or delete_fact. | |
| text | Yes | The complete new text, not a patch. Empty clears instructions or deletes. | |
| fact_id | No | Saved fact to edit or delete, from d8a_get_ai_context. | |
| property_id | Yes | Property ID. | |
| lock_version | No | From d8a_get_ai_context; rejects the change if edited. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| review | No | ||
| target | Yes | ||
| preview | Yes | ||
| expires_at | No | ||
| proposal_id | No | ||
| requires_acknowledgment | Yes |