d8a_prepare_goal_change
Prepare creating or updating a goal without saving it. content has name and conditions: {groups: [[filter, ...], ...]}; groups are alternatives (OR) and the filters in a group must all match (AND). Conditions replace the whole definition. Use exact IDs from d8a_get_query_catalog and an operator it lists for that column, e.g. = or starts_with. mode=create needs name and conditions; mode=update needs goal_id and lock_version from d8a_get_goal and keeps omitted fields. Show the user the complete before and after conditions and the warnings, ask them to approve, then call d8a_execute_change. Editing a goal also changes its results for data already collected. Goals can't be deleted here; don't change goals during weekly reviews or tracking audits unless asked.
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>",
"content": "<content>"
},
"name": "d8a_prepare_goal_change"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | create or update. | |
| content | Yes | Fields to save; omitted ones stay as saved. | |
| goal_id | No | Goal to update; omit when creating. | |
| property_id | Yes | Property ID. | |
| lock_version | No | From d8a_get_goal; needed to update. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| review | No | ||
| target | Yes | ||
| preview | Yes | ||
| expires_at | No | ||
| proposal_id | No | ||
| requires_acknowledgment | Yes |