report_add_visual
Adds validated visuals such as charts, cards, tables, matrices, slicers, or textboxes to a Power BI PBIR report page, with schema-safe visual.json and queryState projections.
Instructions
Add a visual to a PBIR report page (charts, cards, tables, matrices, slicers, textboxes) with validated Microsoft PBIR visual.json schema and queryState projections.
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": {
"projectPath": "<projectPath>",
"pageId": "<pageId>",
"visualType": "<visualType>",
"position": "<position>"
},
"name": "report_add_visual"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | No | Row fields (for pivotTable / matrix) | |
| text | No | Text content (when visualType is 'textbox') | |
| title | No | Visual title shown in the header | |
| pageId | Yes | Target page ID | |
| series | No | Optional Legend / Series split field | |
| sortBy | No | Optional default sort definition | |
| values | No | Measure / Value / Y-axis / Slicer / Table columns | |
| columns | No | Column fields (for pivotTable / matrix) | |
| category | No | Category / X-axis / Legend slice fields (for bar, column, line, area, pie, donut) | |
| position | Yes | Canvas position and dimensions | |
| fontSizePt | No | Font size in points (when visualType is 'textbox') | |
| visualType | Yes | Power BI visual type | |
| projectPath | Yes | Path to the .pbip file or project root folder |