apply_grounding_fix
Applies Marcora's recommended fix for one or more findings ("yes, do recommendation "). This WRITES to the user's library or document, so read each finding's suggested_fix and confirm with the user before applying.
When to use: the user has reviewed findings from check_content_grounding / get_grounding_result or from list_ci_findings (including health-audit recommendations from trigger_health_audit_scan) and wants them acted on. You never compose the fix yourself: pass finding_ids, and each finding's stored recommendation is applied. It is the same action as the Apply button in the Marcora UI: same permissions (admin or editor), same billing, same result.
Where each fix lands: by default the context item named in that finding's context_item_id; a null context_item_id means the content document itself. Pass context_item_overrides to redirect a specific finding elsewhere (the UI's destination picker).
Asynchronous: returns at once with one job per finding. Findings whose fixes land in the same document run together and share a generation_id: poll each distinct generation_id once with get_generation_status. Brand Foundation findings are not grouped. The honest outcome is document_updated there: true means the document changed, false means the recommendation was already covered and nothing was written. Report that distinction; don't assume every applied fix changed something.
Partial success is normal: findings that could not start come back in errors[] with a reason while the rest run. Check both jobs[] and errors[].
Serves BOTH families of finding on the shared substrate: content-grounding findings (from a grounding scan) and Context Intelligence health-audit recommendations (from trigger_health_audit_scan). One tool for both. For a shared generation_id, document_updated covers every finding in that run.
Errors:
Missing param: finding_ids (400). Pass finding_id values from a prior findings response.
InputError: finding_ids must be finding_id UUIDs (400).
InputError: context_item_overrides names a finding not in finding_ids (400). The override would be ignored, so it is rejected rather than silently dropped.
You are not authorized to perform this action (403). Applying requires an admin or editor role.
This finding is not a content grounding finding / has already been resolved (400). Per finding, surfaced in errors[].
Marcora is already updating this document. Per finding, surfaced in errors[]: another run on that document (for example the user's own Content Assistant request, or an earlier apply_grounding_fix call) is still in progress. Wait for it to finish, then retry those findings.
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": {
"finding_ids": "<finding_ids>"
},
"name": "apply_grounding_fix"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| finding_ids | Yes | Required. The finding_id values to apply, from check_content_grounding, get_grounding_result or list_ci_findings. Pass one or many. | |
| context_item_overrides | No | Optional. Redirect specific fixes: a map of finding_id to the context_item_id it should be written to instead of the finding's default target. Every key must also appear in finding_ids. Mirrors the destination picker in the Marcora UI. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobs | No | One entry per finding that started. Jobs whose fixes land in the same document share a generation_id (one run applies them together); poll each distinct generation_id with get_generation_status. | |
| errors | No | Findings that could not be started. The other findings still ran — this is a partial success, not a total failure. | |
| queued | No | How many assistant runs actually started. | |
| skipped | No | How many could not be started — see errors[]. | |
| requested | No | How many findings were submitted. |