draft-report-comment
Create an AI DRAFT explanation (status ai_draft) for a position of the month report. The draft has a short form (summary: one sentence saying why the number deviates, no figures) and an optional detail (may name single amounts from the material). The material is the position's figures plus the notes and clarification answers of the decided cases of the run that belong to it. Drafts are only created on request (here or by a click in the app), never automatically: check list-comment-status first and draft only for positions that are still open. It is NEVER published automatically — the user reviews and publishes it in the app. The response returns summary and detail. Existing explanations are never overwritten silently (see replace_published).
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": {
"run_id": "<run_id>",
"target_type": "<target_type>",
"target_key": "<target_key>"
},
"name": "draft-report-comment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | Yes | UUID of the run | |
| target_key | Yes | Position key: P&L label (tenant category), metric key (e.g. "ebitda"), cost center number, or "total". | |
| target_type | Yes | Position type | |
| instructions | No | Optional hints for the draft | |
| replace_published | No | Required true to replace a comment that is already published (approved in the app); without it the call is rejected with COMMENT_PUBLISHED and the published text stays. |