{"at":"2026-11-23T00:52:57.739Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T00:52:58.015Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"method not found: server/discover"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T00:52:58.066Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T00:52:58.330Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{}},"protocolVersion":"2024-11-05","serverInfo":{"name":"pbirb-mcp","version":"0.4.1"}}}}
{"at":"2026-11-23T00:52:58.330Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T00:52:58.330Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T00:52:58.331Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"Top-level inventory of an RDL: data sources, datasets, parameters, tablixes, charts, and page setup. Always the first call when planning edits. v0.4: `tablixes` returns rich shape hints [{name, rows, columns, has_groups, has_subtotals, has_spans}] (was bare strings — migrate with `[t['name'] for t in tablixes]`). `charts` (new in v0.4) is a top-level array of chart names.","inputSchema":{"additionalProperties":false,"properties":{"path":{"description":"Absolute path to the .rdl file to read.","type":"string"}},"required":["path"],"type":"object"},"name":"describe_report"},{"description":"Full DAX command text, fields, query parameters, and dataset-level filters for every DataSet in the report.","inputSchema":{"additionalProperties":false,"properties":{"path":{"description":"Absolute path to the .rdl file to read.","type":"string"}},"required":["path"],"type":"object"},"name":"get_datasets"},{"description":"Report parameter declarations: name, data type, prompt, flags.","inputSchema":{"additionalProperties":false,"properties":{"path":{"description":"Absolute path to the .rdl file to read.","type":"string"}},"required":["path"],"type":"object"},"name":"get_parameters"},{"description":"Tablix layout with stable IDs: columns, row/column groups, sort expressions, filters, visibility. Required input for any tablix edit.","inputSchema":{"additionalProperties":false,"properties":{"path":{"description":"Absolute path to the .rdl file to read.","type":"string"}},"required":["path"],"type":"object"},"name":"get_tablixes"},{"description":"Replace the DAX command text of a named dataset. The full DAX expression is accepted verbatim; empty bodies are rejected. Optional alias_strategy='preserve_field_names' positionally rewrites <DataField> cells to the new DAX columns while keeping existing <Field Name> identifiers — so Fields!X.Value references in expressions keep resolving.","inputSchema":{"additionalProperties":false,"properties":{"alias_strategy":{"description":"When 'preserve_field_names', positionally remap <DataField> cells to the new DAX column list.","enum":[null,"preserve_field_names"],"type":["string","null"]},"dataset_name":{"type":"string"},"dax_body":{"description":"Full DAX (e.g. EVALUATE TOPN(10, 'Sales')).","type":"string"},"path":{"type":"string"}},"required":["path","dataset_name","dax_body"],"type":"object"},"name":"update_dataset_query"},{"description":"Add a <QueryParameter> binding to a dataset's query. Use to wire report parameters into DAX (e.g. =Parameters!DateFrom.Value).\n\nPBIDATASET parameter naming rule: in DAX/<CommandText>, write @MyParam (with @). In <QueryParameter Name=...>, write MyParam (no @). SQL/MDX use @ in both places. This tool detects the dataset's provider and AUTO-STRIPS a leading @ from `name` for PBIDATASET datasets, returning {normalised: true, warning: ...}. Pass force_at_prefix=true to override (rare; needed for some RSCustomDaxFilter patterns).","inputSchema":{"additionalProperties":false,"properties":{"dataset_name":{"type":"string"},"force_at_prefix":{"default":false,"type":"boolean"},"name":{"type":"string"},"path":{"type":"string"},"value_expression":{"type":"string"}},"required":["path","dataset_name","name","value_expression"],"type":"object"},"name":"add_query_parameter"},{"description":"Change the value expression of an existing query parameter. Same PBIDATASET @-prefix normalisation as add_query_parameter applies on lookup; legacy Name='@X' parameters that already exist on disk are addressable via either @X or X.","inputSchema":{"additionalProperties":false,"properties":{"dataset_name":{"type":"string"},"force_at_prefix":{"default":false,"type":"boolean"},"name":{"type":"string"},"path":{"type":"string"},"value_expression":{"type":"string"}},"required":["path","dataset_name","name","value_expression"],"type":"object"},"name":"update_query_parameter"},{"description":"Repoint a DataSource at a Power BI XMLA endpoint. workspace_url accepts a bare workspace name or a full powerbi:// URL; DataProvider is set to SQL (the AS provider id in RDL).","inputSchema":{"additionalProperties":false,"properties":{"dataset_name":{"description":"PBI semantic model (Initial Catalog).","type":"string"},"integrated_security":{"description":"Default true. False omits the element.","type":"boolean"},"name":{"description":"RDL DataSource Name attribute.","type":"string"},"path":{"type":"string"},"workspace_url":{"description":"Workspace name or full powerbi:// XMLA URL.","type":"string"}},"required":["path","name","workspace_url","dataset_name"],"type":"object"},"name":"set_datasource_connection"},{"description":"Return a rich list of every <DataSource> in the report — name, data_provider, connect_string, integrated_security, shared_reference, security_type, data_source_id. describe_report.data_sources returns names only; this tool is the authoring-friendly read.","inputSchema":{"additionalProperties":false,"properties":{"path":{"description":"Absolute path to the .rdl file to read.","type":"string"}},"required":["path"],"type":"object"},"name":"list_data_sources"},{"description":"Single-DataSource read-back (parity with get_textbox / get_image / get_rectangle / get_chart). Returns the same shape as one entry of list_data_sources.","inputSchema":{"additionalProperties":false,"properties":{"name":{"type":"string"},"path":{"type":"string"}},"required":["path","name"],"type":"object"},"name":"get_data_source"},{"description":"Create a new <DataSource> for a Power BI XMLA endpoint. workspace_url accepts a bare workspace name or a full powerbi:// URL. Generates a fresh rd:DataSourceID GUID. Refuses if a DataSource of the same name already exists. provider='sql' (default) emits the legacy DataProvider=SQL + powerbi:// ConnectString + <rd:SecurityType> shape; provider='pbidataset' emits the modern PBI Desktop shape — DataProvider=PBIDATASET, pbiazure:// ConnectString with ClaimsToken auth, plus <rd:PowerBIWorkspaceName> / <rd:PowerBIDatasetName> siblings, no <rd:SecurityType>.","inputSchema":{"additionalProperties":false,"properties":{"dataset_name":{"type":"string"},"integrated_security":{"default":true,"type":"boolean"},"name":{"type":"string"},"path":{"type":"string"},"provider":{"default":"sql","enum":["sql","pbidataset"],"type":"string"},"workspace_url":{"type":"string"}},"required":["path","name","workspace_url","dataset_name"],"type":"object"},"name":"add_data_source"},{"description":"Remove a named <DataSource>. Refuses by default if any DataSet/Query/DataSourceName or DataSource/DataSourceReference still references it; the error lists the offending locators. Pass force=True to remove anyway.","inputSchema":{"additionalProperties":false,"properties":{"force":{"default":false,"type":"boolean"},"name":{"type":"string"},"path":{"type":"string"}},"required":["path","name"],"type":"object"},"name":"remove_data_source"},{"description":"Rename a <DataSource> and rewrite every reference: DataSet/Query/DataSourceName entries AND any DataSource/DataSourceReference shared-source links. Atomic: stages all matches before committing. Errors if new_name already exists or equals old_name.","inputSchema":{"additionalProperties":false,"properties":{"new_name":{"type":"string"},"old_name":{"type":"string"},"path":{"type":"string"}},"required":["path","old_name","new_name"],"type":"object"},"name":"rename_data_source"},{"description":"List dataset-level filters in document order. Returns [{expression, operator, values}]; index in the list is the stable handle for remove_dataset_filter. DataSet filters apply to every consumer of the dataset (every Tablix / Chart bound to it); use list_tablix_filters for per-tablix filtering.","inputSchema":{"additionalProperties":false,"properties":{"dataset_name":{"type":"string"},"path":{"type":"string"}},"required":["path","dataset_name"],"type":"object"},"name":"list_dataset_filters"},{"description":"Append a <Filter> to the named dataset's <Filters> block. operator ∈ Equal / NotEqual / GreaterThan / LessThan / GreaterThanOrEqual / LessThanOrEqual / Like / In / Between / TopN / BottomN / TopPercent / BottomPercent. values must be non-empty (single-value filters use a one-element list). Returns the new filter's index for later removal. Optional field_format wraps the expression as Format(<body>, fmt) to coerce typed fields for string-parameter comparison. Response includes warnings for field/parameter type mismatches detected via best-effort cross-check.","inputSchema":{"additionalProperties":false,"properties":{"dataset_name":{"type":"string"},"expression":{"description":"FilterExpression — usually a Fields! reference.","type":"string"},"field_format":{"description":"Optional format string (e.g. 'MMM, yyyy') wrapping the expression as Format(<body>, '<fmt>').","type":"string"},"operator":{"type":"string"},"path":{"type":"string"},"values":{"items":{"type":"string"},"minItems":1,"type":"array"}},"required":["path","dataset_name","expression","operator","values"],"type":"object"},"name":"add_dataset_filter"},{"description":"Remove a dataset-level filter by its 0-based document-order index. Cleans up the empty <Filters> block when removing the last entry.","inputSchema":{"additionalProperties":false,"properties":{"dataset_name":{"type":"string"},"filter_index":{"minimum":0,"type":"integer"},"path":{"type":"string"}},"required":["path","dataset_name","filter_index"],"type":"object"},"name":"remove_dataset_filter"},{"description":"Single-DataSet read-back (parity with get_textbox / get_image / get_rectangle / get_chart / get_data_source). Returns dataset name, data_source, command_text, fields (with both data_field and value), query_parameters, filters, and designer_state_present.","inputSchema":{"additionalProperties":false,"properties":{"name":{"type":"string"},"path":{"type":"string"}},"required":["path","name"],"type":"object"},"name":"get_dataset"},{"description":"Append a calculated <Field> to the named dataset. Calculated fields carry an expression (<Value>) instead of a column reference (<DataField>); use them for derived fields like Total = Amount * Quantity that aren't in the source query but should be available via Fields!Name.Value. Refuses if a field of the same name already exists.","inputSchema":{"additionalProperties":false,"properties":{"dataset_name":{"type":"string"},"expression":{"description":"RDL expression, e.g. '=Fields!Amount.Value * Fields!Quantity.Value'.","type":"string"},"field_name":{"type":"string"},"path":{"type":"string"}},"required":["path","dataset_name","field_name","expression"],"type":"object"},"name":"add_calculated_field"},{"description":"Remove a calculated <Field> by name. Refuses if the field is data-bound (carries <DataField> instead of <Value>) — those reflect the source query's columns. Drop a data-bound field via remove_dataset_field, or rewrite the dataset query via update_dataset_query.","inputSchema":{"additionalProperties":false,"properties":{"dataset_name":{"type":"string"},"field_name":{"type":"string"},"path":{"type":"string"}},"required":["path","dataset_name","field_name"],"type":"object"},"name":"remove_calculated_field"},{"description":"Remove a data-bound <Field> by name (one with <DataField>). Symmetric counterpart to remove_calculated_field. Refuses on calculated fields (use remove_calculated_field instead) and on still-referenced fields (any expression containing Fields!<name>.Value / .IsMissing / .Count). Pass force=True to delete anyway. Closes the cookbook flow: refresh_dataset_fields lists orphans, remove_dataset_field drops them. Returns {dataset, removed, kind: 'DataBoundField'}.","inputSchema":{"additionalProperties":false,"properties":{"dataset_name":{"type":"string"},"field_name":{"type":"string"},"force":{"description":"Default false: refuse if the field is still referenced anywhere. true: delete anyway (prefer fixing the references first).","type":"boolean"},"path":{"type":"string"}},"required":["path","dataset_name","field_name"],"type":"object"},"name":"remove_dataset_field"},{"description":"Append a data-bound <Field> to a dataset's <Fields> block. Writes <DataField>data_field</DataField> (and optional <rd:TypeName>type_name</rd:TypeName>). Distinct from add_calculated_field which writes <Value> for derived fields. Use after rewriting the DAX to declare a new column that came back from the query but isn't yet in <Fields>. Refuses on duplicate field name.","inputSchema":{"additionalProperties":false,"properties":{"data_field":{"description":"Source column reference, e.g. 'Sales[ProductID]' or '[Region]' (the form depends on DAX shape).","type":"string"},"dataset_name":{"type":"string"},"field_name":{"type":"string"},"path":{"type":"string"},"type_name":{"description":".NET type, e.g. 'System.String', 'System.DateTime', 'System.Decimal'. Optional.","type":["string","null"]}},"required":["path","dataset_name","field_name","data_field"],"type":"object"},"name":"add_dataset_field"},{"description":"Sync a dataset's <Fields> block against the shape detected in its DAX <CommandText>. Eliminates the manual 'open Report Builder → right-click → Refresh Fields' step after a query rewrite. Recognises SELECTCOLUMNS aliases and Table[Col] tokens (SUMMARIZECOLUMNS / ad-hoc). Adds missing fields; lists orphans without auto-removing (caller decides what to drop). Returns {added, orphans, unchanged, warnings}. Cheap regex-based detection — bare EVALUATE 'Table' returns a warning.","inputSchema":{"additionalProperties":false,"properties":{"dataset_name":{"type":"string"},"path":{"type":"string"}},"required":["path","dataset_name"],"type":"object"},"name":"refresh_dataset_fields"},{"description":"Set <Image>/<Sizing> on a named Image. sizing ∈ AutoSize / Fit / FitProportional / Clip. AutoSize renders at native size (box grows to fit); Fit stretches to fill (ignores aspect ratio); FitProportional preserves aspect ratio; Clip renders at native size, clipped to the box. Idempotent: same value → {changed: false}, no save.","inputSchema":{"additionalProperties":false,"properties":{"image_name":{"type":"string"},"path":{"type":"string"},"sizing":{"enum":["AutoSize","Fit","FitProportional","Clip"],"type":"string"}},"required":["path","image_name","sizing"],"type":"object"},"name":"set_image_sizing"},{"description":"Repoint an existing <Image> at a different embedded image entry without delete-and-readd. Sets Source=Embedded and rewrites <Value> to embedded_name. Refuses with a clear error if embedded_name isn't in <EmbeddedImages> — leaving a dangling reference would render as a broken image. Add the image first via add_embedded_image. Idempotent: same (Source, Value) pair → {changed: false}, no save. Returns {name, kind, changed: bool}.","inputSchema":{"additionalProperties":false,"properties":{"embedded_name":{"type":"string"},"image_name":{"type":"string"},"path":{"type":"string"}},"required":["path","image_name","embedded_name"],"type":"object"},"name":"set_image_source"},{"description":"Set <Width> on a tablix's body column. column accepts a 0-based integer index OR a textbox name living in any cell of that column (mirrors how set_cell_span / add_subtotal_row address columns). width is an RDL size ('1.5in', '4cm', '80pt'). Idempotent: same width → {changed: false}, no save.","inputSchema":{"additionalProperties":false,"properties":{"column":{"description":"0-based column index or textbox name in any column cell.","oneOf":[{"minimum":0,"type":"integer"},{"type":"string"}]},"path":{"type":"string"},"tablix_name":{"type":"string"},"width":{"type":"string"}},"required":["path","tablix_name","column","width"],"type":"object"},"name":"set_column_width"},{"description":"Resize a tablix by writing <Height> and / or <Width> directly. Each arg independently optional. Use after adding header / footer rows that change the body's natural height — v0.2's positioning tools only cover top/left, not size. Both values are RDL size strings. Returns {tablix, kind, changed: list[str]} — empty list when inputs match existing.","inputSchema":{"additionalProperties":false,"properties":{"height":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"width":{"type":"string"}},"required":["path","name"],"type":"object"},"name":"set_tablix_size"},{"description":"Reorder <ReportParameter> children to match the supplied names list. names MUST be a permutation of every existing parameter — no missing, no duplicates, no unknown names. When a <ReportParametersLayout> exists, its CellDefinition entries are reordered in lockstep so the parameter pane shows fields in the new declaration order. RowIndex / ColumnIndex are not recomputed (RB's layout grid is independent of declaration order). Returns {order, kind, changed: bool}; same order → no save.","inputSchema":{"additionalProperties":false,"properties":{"names":{"items":{"type":"string"},"minItems":1,"type":"array"},"path":{"type":"string"}},"required":["path","names"],"type":"object"},"name":"reorder_parameters"},{"description":"Author <ReportParametersLayout>/<GridLayoutDefinition> explicitly. Writes <NumberOfRows> + <NumberOfColumns>; rewrites <CellDefinitions> so each name in parameter_order lands at (row=index // columns, col=index % columns). Strict permutation check (every existing parameter exactly once). rows*columns must be ≥ parameter count. Auto-creates the layout block when absent. Idempotent: same grid + order → no save. Complements reorder_parameters (declaration order) and sync_parameter_layout (gap-filling). Returns {rows, columns, order, kind, changed}.","inputSchema":{"additionalProperties":false,"properties":{"columns":{"minimum":1,"type":"integer"},"parameter_order":{"items":{"type":"string"},"minItems":1,"type":"array"},"path":{"type":"string"},"rows":{"minimum":1,"type":"integer"}},"required":["path","rows","columns","parameter_order"],"type":"object"},"name":"set_parameter_layout"},{"description":"Clone an .rdl to a new path. When regenerate_ids=true (default), every <rd:DataSourceID> and any <rd:ReportID> is rewritten to a fresh uuid4() so Power BI Report Builder doesn't refuse to load the duplicate due to identity collision. Atomic-write convention from RDLDocument.save_as. Refuses if dst_path already exists. Returns {src, dst, regenerated_ids: list[str]}.","inputSchema":{"additionalProperties":false,"properties":{"dst_path":{"type":"string"},"regenerate_ids":{"default":true,"type":"boolean"},"src_path":{"type":"string"}},"required":["src_path","dst_path"],"type":"object"},"name":"duplicate_report"},{"description":"Read an embedded image's base64 <ImageData> for porting it to another report without re-reading from disk. Returns {name, mime_type, base64, byte_size}. base64 is the raw text of the ImageData element; byte_size is the decoded size for sanity-checking. Refuses with ElementNotFoundError if the named entry isn't in <EmbeddedImages>.","inputSchema":{"additionalProperties":false,"properties":{"name":{"type":"string"},"path":{"type":"string"}},"required":["path","name"],"type":"object"},"name":"get_embedded_image_data"},{"description":"Run schema/structural validation against an .rdl. Returns {valid, errors, xsd_used}. Structural checks always run (root element + required top-level sections). The Microsoft RDL 2016/01 XSD is bundled by default since v0.3.1 — when it's loaded, xsd_used is True and the schema-conformance bug class Power BI Report Builder rejects on load gets caught here. If the bundled XSD is missing (source-build without package-data) a {severity:warning, rule:'xsd-not-bundled'} issue surfaces instead of silent skip. Each issue is {severity, rule, location, message, suggestion?}; valid is True iff no severity='error' issue.","inputSchema":{"additionalProperties":false,"properties":{"path":{"description":"Absolute path to the .rdl file to read.","type":"string"}},"required":["path"],"type":"object"},"name":"validate_report"},{"description":"One-shot static check: union of validate_report and lint_report. Returns {valid, issues, xsd_used} where valid is True iff no issue has severity='error'. Warnings (including 'xsd-not-bundled' when the schema file is missing) don't invalidate the report. Use this as the single 'is the report OK?' tool, or set PBIRB_MCP_AUTO_VERIFY=1 to have it run after every mutating call.","inputSchema":{"additionalProperties":false,"properties":{"path":{"description":"Absolute path to the .rdl file to read.","type":"string"}},"required":["path"],"type":"object"},"name":"verify_report"},{"description":"Run static-analysis lint rules against an .rdl. Sixteen rules cover the v0.2/v0.3 sweep bug classes (multi-value-eq, missing-field-reference, dangling-embedded-image, pbidataset-at-prefix, parameter-layout-out-of-sync, double-encoded-entities, stale-designer-state, tablix-span-misplaced, dataset-fields-out-of-sync, etc.). Returns {issues, rules_run} with each issue {severity, rule, location, message, suggestion?}. Optional `rules` selects a subset by name.","inputSchema":{"additionalProperties":false,"properties":{"path":{"type":"string"},"rules":{"description":"Optional subset of rule names; default runs all 16.","items":{"type":"string"},"type":"array"}},"required":["path"],"type":"object"},"name":"lint_report"},{"description":"Apply a list of {tool, args} ops to a tempfile clone of the report; return the unified diff and a verify (validate + lint) report. The original file is NEVER modified. The harness auto-injects `path` into each op's args, so callers don't supply it. On op failure, dispatch stops; partial diff + verify are still returned. Use this to preview risky multi-step edits before committing.","inputSchema":{"additionalProperties":false,"properties":{"ops":{"description":"Sequence of tool calls to dispatch against the tempfile.","items":{"additionalProperties":false,"properties":{"args":{"type":"object"},"tool":{"type":"string"}},"required":["tool"],"type":"object"},"type":"array"},"path":{"type":"string"}},"required":["path","ops"],"type":"object"},"name":"dry_run_edit"},{"description":"Open the report and start an editing transaction. Returns {transaction_id, path, expires_at}. Pass transaction_id to subsequent edit tools to mutate the live in-memory tree WITHOUT touching disk between calls — eliminates the per-edit parse+serialize round-trip. The transaction times out after PBIRB_MCP_TRANSACTION_TIMEOUT_S seconds (default 600); call commit_editing_transaction to flush or cancel_editing_transaction to discard. Refuses if an active transaction already owns this path.","inputSchema":{"additionalProperties":false,"properties":{"path":{"description":"Absolute path to the .rdl file to read.","type":"string"}},"required":["path"],"type":"object"},"name":"start_editing_transaction"},{"description":"Lint the in-memory tree, save to disk once (atomic .tmp + rename), and deregister. Aborts (saved=False) if lint surfaces any severity='error' issue — the transaction stays OPEN so the caller can fix the offending state and re-commit. Returns {transaction_id, path, saved, verify}.","inputSchema":{"additionalProperties":false,"properties":{"transaction_id":{"type":"string"}},"required":["transaction_id"],"type":"object"},"name":"commit_editing_transaction"},{"description":"Discard a transaction. The in-memory tree is dropped; the on-disk file is unchanged from when the transaction was started. Returns {transaction_id, path, discarded}.","inputSchema":{"additionalProperties":false,"properties":{"transaction_id":{"type":"string"}},"required":["transaction_id"],"type":"object"},"name":"cancel_editing_transaction"},{"description":"Atomic batch: open once → apply ops → lint → save once. Opens an internal transaction against path, dispatches each {tool, args} op through the JSON-RPC tools/call path with transaction_id injected, and commits at the end. On any op failure or lint-error at commit, rolls back — disk is byte-identical to its pre-call state. Compare with dry_run_edit (clones to tempfile, never touches the real file): use dry_run_edit to preview a plan, apply_edits to land it. Returns {applied: [{tool, ok, result|error}], verify, committed}.","inputSchema":{"additionalProperties":false,"properties":{"ops":{"description":"Ordered list of tool calls to apply atomically.","items":{"additionalProperties":false,"properties":{"args":{"type":"object"},"tool":{"type":"string"}},"required":["tool"],"type":"object"},"type":"array"},"path":{"type":"string"}},"required":["path","ops"],"type":"object"},"name":"apply_edits"},{"description":"Emit a minimal valid RDL from scratch at `path`. Refuses if `path` exists (no clobbering). Default page_setup is US Letter portrait with 1in margins; pass any subset of {page_height, page_width, margin_top, margin_bottom, margin_left, margin_right, body_width, body_height} to override. `datasource` is a forward-compat hook — pass {name, workspace_url, dataset_name, provider, integrated_security} to wire a real PBI XMLA endpoint (v0.4 commit 14); omit for a placeholder DataSource1 + DataSet1 stub the caller fills in via subsequent tools. Validates structurally + against the bundled XSD before saving (atomic .tmp + rename). Returns {path, validated, size_bytes}.","inputSchema":{"additionalProperties":false,"properties":{"datasource":{"default":null,"type":["object","null"]},"page_setup":{"additionalProperties":{"type":"string"},"default":null,"type":["object","null"]},"path":{"type":"string"}},"required":["path"],"type":"object"},"name":"create_report"},{"description":"Return a static cheat-sheet of common RDL expression patterns: globals, parameters, fields, aggregates, conditionals, strings, dates. Each entry is {name, syntax, example, description}. Call this when authoring a textbox value or filter expression instead of guessing — and note the explicit encoding hint for the `&` concat operator.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"get_expression_reference"},{"description":"Emit =Sum(IIf(<condition>, 1, 0)) — the SSRS conditional-count idiom. condition is an RDL expression body (no leading '='). Returns a complete top-level expression suitable for set_textbox_value or any RDL <Value> sink.","inputSchema":{"additionalProperties":false,"properties":{"condition":{"description":"RDL expression body, e.g. 'Fields!Status.Value = \"Active\"'.","type":"string"}},"required":["condition"],"type":"object"},"name":"count_where"},{"description":"Emit =Sum(IIf(<condition>, <field_expression>, 0)) — the SSRS conditional-sum idiom. Both args are expression bodies (no leading '=').","inputSchema":{"additionalProperties":false,"properties":{"condition":{"description":"RDL expression body, e.g. 'Fields!Status.Value = \"Active\"'.","type":"string"},"field_expression":{"description":"Value to sum, e.g. 'Fields!Amount.Value'.","type":"string"}},"required":["field_expression","condition"],"type":"object"},"name":"sum_where"},{"description":"Emit =IIf(<condition>, <true_value>, <false_value>). All three args are expression bodies (no leading '='); string literals must already be quoted, e.g. true_value='\"Yes\"'.","inputSchema":{"additionalProperties":false,"properties":{"condition":{"type":"string"},"false_value":{"type":"string"},"true_value":{"type":"string"}},"required":["condition","true_value","false_value"],"type":"object"},"name":"iif_format"},{"description":"Set <BreakLocation> on a tablix group's page-break rule. location ∈ {None, Start, End, StartAndEnd, Between}. Passing 'None' removes the <PageBreak> element (the canonical 'no break' shape). Idempotent. Returns {tablix, group, kind: 'Group', location, changed}.","inputSchema":{"additionalProperties":false,"properties":{"group_name":{"type":"string"},"location":{"enum":["None","Start","End","StartAndEnd","Between"],"type":"string"},"path":{"type":"string"},"tablix_name":{"type":"string"}},"required":["path","tablix_name","group_name","location"],"type":"object"},"name":"set_group_page_break"},{"description":"Set <TablixMember>/<RepeatOnNewPage> on the member that wraps the named group. Most common use: repeat a group header row at the top of every page the group spans. Setting repeat=False removes the element (False is default). Returns {tablix, group, kind: 'TablixMember', repeat, changed}.","inputSchema":{"additionalProperties":false,"properties":{"group_name":{"type":"string"},"path":{"type":"string"},"repeat":{"type":"boolean"},"tablix_name":{"type":"string"}},"required":["path","tablix_name","group_name","repeat"],"type":"object"},"name":"set_repeat_on_new_page"},{"description":"Set <KeepTogether> on a named Tablix / Rectangle / Chart / Textbox / Map / Gauge. Tells the renderer 'don't split this across pages if you can help it'. Best-effort — items larger than a page are still split. keep=False removes the element. Refuses for Image / Line / Subreport and other kinds where the RDL XSD doesn't allow it.","inputSchema":{"additionalProperties":false,"properties":{"keep":{"type":"boolean"},"name":{"type":"string"},"path":{"type":"string"}},"required":["path","name","keep"],"type":"object"},"name":"set_keep_together"},{"description":"Set <TablixMember>/<KeepWithGroup> on the member that wraps the named group. value ∈ {None, Before, After}. Typical use: a column-header row's member with 'After' to glue it to the data rows that follow. value='None' removes the element.","inputSchema":{"additionalProperties":false,"properties":{"group_name":{"type":"string"},"path":{"type":"string"},"tablix_name":{"type":"string"},"value":{"enum":["None","Before","After"],"type":"string"}},"required":["path","tablix_name","group_name","value"],"type":"object"},"name":"set_keep_with_group"},{"description":"Add a <Rectangle> to <Body>/<ReportItems>. With no contained_items the rectangle is empty (a visual frame). With contained_items=[name1, name2, ...], each named body item is MOVED into the rectangle's <ReportItems> and its <Top>/<Left> recalculated so the on-screen position is preserved. Refuses on duplicate name or if any contained_item isn't in <Body>/<ReportItems>. Returns {name, kind: 'Rectangle', moved}.","inputSchema":{"additionalProperties":false,"properties":{"contained_items":{"default":[],"description":"Optional names of existing body items to move into the rectangle. Omit or pass [] for an empty rectangle (visual frame).","items":{"type":"string"},"minItems":0,"type":"array"},"height":{"type":"string"},"left":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"top":{"type":"string"},"width":{"type":"string"}},"required":["path","name","top","left","width","height"],"type":"object"},"name":"add_rectangle"},{"description":"Add a List (single-cell repeating Tablix) bound to a dataset. RDL has no distinct <List> element — Report Builder's List is a Tablix with one column, one detail row, and a Rectangle inside the cell. Items placed in the rectangle repeat once per dataset row. The inner rectangle is named '<name>_Rect' for subsequent lookup. Returns {name, kind: 'Tablix', dataset, rectangle}.","inputSchema":{"additionalProperties":false,"properties":{"dataset_name":{"type":"string"},"height":{"type":"string"},"left":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"top":{"type":"string"},"width":{"type":"string"}},"required":["path","name","dataset_name","top","left","width","height"],"type":"object"},"name":"add_list"},{"description":"Add a <Line> to <Body>/<ReportItems>. RDL Line semantics: top/left is the start point; width/height is the offset (vector) to the end point — horizontal line uses height='0in', vertical uses width='0in'. Optional color, line_thickness ('1pt' default), line_style (Solid/Dashed/Dotted/Double/etc.). Returns {name, kind: 'Line'}.","inputSchema":{"additionalProperties":false,"properties":{"color":{"type":"string"},"height":{"type":"string"},"left":{"type":"string"},"line_style":{"enum":["None","Dotted","Dashed","Solid","Double","Groove","Ridge","Inset","WindowInset","Outset"],"type":"string"},"line_thickness":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"top":{"type":"string"},"width":{"type":"string"}},"required":["path","name","top","left","width","height"],"type":"object"},"name":"add_line"},{"description":"Read-only XPath query against the report. Returns matched elements as serialised XML strings. XPath context is <Report> (the root); 'r:' is bound to the RDL namespace, 'rd:' to the rd namespace. Examples: \"r:DataSources/r:DataSource[@Name='X']\" / \".//r:Textbox[@Name='X']/r:Style\". Returns [] when nothing matches; raises on malformed xpath.","inputSchema":{"additionalProperties":false,"properties":{"path":{"type":"string"},"xpath":{"type":"string"}},"required":["path","xpath"],"type":"object"},"name":"raw_xml_view"},{"description":"Replace the single element matched by xpath with new content. content is parsed with RDL as the default namespace and 'rd:' bound, so bare names like <Textbox><Value>x</Value></Textbox> work without explicit xmlns. Refuses on zero matches, multiple matches, or if the xpath targets the <Report> root. Saves atomically. Returns {xpath, kind, changed}.","inputSchema":{"additionalProperties":false,"properties":{"content":{"description":"XML for the replacement element. Exactly one top-level element.","type":"string"},"path":{"type":"string"},"xpath":{"type":"string"}},"required":["path","xpath","content"],"type":"object"},"name":"raw_xml_replace"},{"description":"Set <Textbox>/<Action> to a Hyperlink (URL), Drillthrough (another report + optional parameters), or BookmarkLink (jump within document). target_expression accepts literal text or =expression. drillthrough_parameters is a list of {name, value} dicts wired into <Drillthrough>/<Parameters>. Idempotent: same action_type + target + parameters → {changed: false}, no save.","inputSchema":{"additionalProperties":false,"properties":{"action_type":{"enum":["Hyperlink","Drillthrough","BookmarkLink"],"type":"string"},"drillthrough_parameters":{"items":{"additionalProperties":false,"properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"type":"string"},"target_expression":{"type":"string"},"textbox_name":{"type":"string"}},"required":["path","textbox_name","action_type","target_expression"],"type":"object"},"name":"set_textbox_action"},{"description":"Same shape as set_textbox_action but operates on a named <Image>. action_type ∈ Hyperlink / Drillthrough / BookmarkLink. Returns {image, kind, action_type, changed}.","inputSchema":{"additionalProperties":false,"properties":{"action_type":{"enum":["Hyperlink","Drillthrough","BookmarkLink"],"type":"string"},"drillthrough_parameters":{"items":{"additionalProperties":false,"properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"image_name":{"type":"string"},"path":{"type":"string"},"target_expression":{"type":"string"}},"required":["path","image_name","action_type","target_expression"],"type":"object"},"name":"set_image_action"},{"description":"Set <Textbox>/<ToolTip>. Literal text or =expression. Pass '' to clear. Idempotent. Returns {textbox, kind, changed: bool}.","inputSchema":{"additionalProperties":false,"properties":{"path":{"type":"string"},"text_or_expression":{"type":"string"},"textbox_name":{"type":"string"}},"required":["path","textbox_name","text_or_expression"],"type":"object"},"name":"set_textbox_tooltip"},{"description":"Set <DocumentMapLabel> on any named ReportItem (Textbox / Image / Rectangle / Chart / Tablix / etc.). Surfaces in the rendered report's navigable document-map / table-of-contents pane. Pass '' to clear. Idempotent. Returns {element, kind, changed: bool}.","inputSchema":{"additionalProperties":false,"properties":{"element_name":{"type":"string"},"label_or_expression":{"type":"string"},"path":{"type":"string"}},"required":["path","element_name","label_or_expression"],"type":"object"},"name":"set_document_map_label"},{"description":"Set <ChartSeries>/<Action> to a Hyperlink (URL), Drillthrough (another report + optional parameters), or BookmarkLink. Same kwarg surface as set_textbox_action / set_image_action; the chart series is addressed by (chart_name, series_name). Schema-aware insertion respects ChartSeries child order. Idempotent on structural equality of the inner block.","inputSchema":{"additionalProperties":false,"properties":{"action_type":{"enum":["Hyperlink","Drillthrough","BookmarkLink"],"type":"string"},"chart_name":{"type":"string"},"drillthrough_parameters":{"items":{"additionalProperties":false,"properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"type":"string"},"series_name":{"type":"string"},"target_expression":{"type":"string"}},"required":["path","chart_name","series_name","action_type","target_expression"],"type":"object"},"name":"set_chart_series_action"},{"description":"Remove a query parameter from a dataset. Cleans up the empty <QueryParameters/> block when removing the last one.","inputSchema":{"additionalProperties":false,"properties":{"dataset_name":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"}},"required":["path","dataset_name","name"],"type":"object"},"name":"remove_query_parameter"},{"description":"List all filters on a named tablix in document order. Returns expression, operator, and values per filter; index in the list is the stable handle for remove_tablix_filter.","inputSchema":{"additionalProperties":false,"properties":{"path":{"type":"string"},"tablix_name":{"type":"string"}},"required":["path","tablix_name"],"type":"object"},"name":"list_tablix_filters"},{"description":"Append a <Filter> to a tablix. Operator must be one of the RDL 2016 enumeration (Equal, NotEqual, GreaterThan, In, Between, ...). Returns the new filter's index for follow-up calls. Optional field_format wraps the expression as Format(<body>, fmt) to coerce typed fields for string-parameter comparison. The response includes warnings for cross-checked field/parameter type mismatches.","inputSchema":{"additionalProperties":false,"properties":{"expression":{"type":"string"},"field_format":{"description":"Optional format string (e.g. 'MMM, yyyy') wrapping the expression as Format(<body>, '<fmt>').","type":"string"},"operator":{"type":"string"},"path":{"type":"string"},"tablix_name":{"type":"string"},"values":{"items":{"type":"string"},"minItems":1,"type":"array"}},"required":["path","tablix_name","expression","operator","values"],"type":"object"},"name":"add_tablix_filter"},{"description":"Add a row group that wraps the entire current top-level row hierarchy. Inserts a matching group-header row at body row 0 with the group expression in the first cell. parent_group (nesting under an existing group) is reserved for a future commit and currently raises NotImplementedError.","inputSchema":{"additionalProperties":false,"properties":{"group_expression":{"description":"RDL expression, e.g. =Fields!Region.Value","type":"string"},"group_name":{"type":"string"},"parent_group":{"type":["string","null"]},"path":{"type":"string"},"tablix_name":{"type":"string"}},"required":["path","tablix_name","group_name","group_expression"],"type":"object"},"name":"add_row_group"},{"description":"Inverse of add_row_group: unwraps a group's children back to its parent hierarchy and removes the matching header row at body row 0. Refuses to remove the conventional Details group.","inputSchema":{"additionalProperties":false,"properties":{"group_name":{"type":"string"},"path":{"type":"string"},"tablix_name":{"type":"string"}},"required":["path","tablix_name","group_name"],"type":"object"},"name":"remove_row_group"},{"description":"Convert a row-grouped + column-grouped tablix into a matrix by dropping the residual Details row group and its body row. Pre-conditions (all checked): the named row_group and column_group must already exist (call add_row_group + add_column_group first); a <Group Name='Details'> must still be present in the row hierarchy. Refuses on second call (already a matrix). Use this after the standard insert_tablix_from_template + add_row_group + add_column_group flow to make the leaf the row group instead of Details — without this, cells render at detail granularity. Pair with set_tablix_corner (v0.4 commit 18) to author the top-left label.","inputSchema":{"additionalProperties":false,"properties":{"column_group":{"type":"string"},"path":{"type":"string"},"row_group":{"type":"string"},"tablix_name":{"type":"string"}},"required":["path","tablix_name","row_group","column_group"],"type":"object"},"name":"convert_to_matrix"},{"description":"Write the <TablixCorner> block — the top-left cell of a matrix-shaped tablix that holds the row-axis caption (e.g. 'Type'). Pass `text` for a literal value OR `expression` for a VB.NET '=...' formula. Mutually exclusive. Textbox name is deterministic: '<tablix_name>_Corner'. Refuses if the tablix has no named column group (the corner is only meaningful in a matrix). Replaces any existing TablixCorner block. Returns {tablix, name, kind: 'TablixCorner', changed}.","inputSchema":{"additionalProperties":false,"properties":{"expression":{"default":null,"type":["string","null"]},"path":{"type":"string"},"tablix_name":{"type":"string"},"text":{"default":null,"type":["string","null"]}},"required":["path","tablix_name"],"type":"object"},"name":"set_tablix_corner"},{"description":"Replace a group's <SortExpressions> with a fresh list. Each entry is an RDL expression, e.g. =Fields!Region.Value.","inputSchema":{"additionalProperties":false,"properties":{"group_name":{"type":"string"},"path":{"type":"string"},"sort_expressions":{"items":{"type":"string"},"type":"array"},"tablix_name":{"type":"string"}},"required":["path","tablix_name","group_name","sort_expressions"],"type":"object"},"name":"set_group_sort"},{"description":"Set <Visibility> on a group's TablixMember. Accepts a Hidden expression and an optional ToggleItem (a textbox name that toggles the group expand/collapse).","inputSchema":{"additionalProperties":false,"properties":{"group_name":{"type":"string"},"path":{"type":"string"},"tablix_name":{"type":"string"},"toggle_textbox":{"type":["string","null"]},"visibility_expression":{"type":"string"}},"required":["path","tablix_name","group_name","visibility_expression"],"type":"object"},"name":"set_group_visibility"},{"description":"Add a column group that wraps the current top-level column hierarchy. Inserts a matching column at body column 0 (default 1in width) and a header cell at column 0 of every existing row with the group expression in the topmost cell. Mirrors add_row_group on the column axis. parent_group nesting is reserved for a future commit and currently raises NotImplementedError.","inputSchema":{"additionalProperties":false,"properties":{"group_expression":{"description":"RDL expression, e.g. =Fields!Region.Value","type":"string"},"group_name":{"type":"string"},"parent_group":{"type":["string","null"]},"path":{"type":"string"},"tablix_name":{"type":"string"}},"required":["path","tablix_name","group_name","group_expression"],"type":"object"},"name":"add_column_group"},{"description":"Inverse of add_column_group: unwraps a column-axis group's children back to the top of the column hierarchy and removes the matching body column at position 0 (along with each row's first cell). Errors if group_name only exists on the row axis.","inputSchema":{"additionalProperties":false,"properties":{"group_name":{"type":"string"},"path":{"type":"string"},"tablix_name":{"type":"string"}},"required":["path","tablix_name","group_name"],"type":"object"},"name":"remove_column_group"},{"description":"Replace a column-axis group's <SortExpressions> with a fresh list. Mirrors set_group_sort but refuses up front if group_name is on the row axis (use set_group_sort instead).","inputSchema":{"additionalProperties":false,"properties":{"group_name":{"type":"string"},"path":{"type":"string"},"sort_expressions":{"items":{"type":"string"},"type":"array"},"tablix_name":{"type":"string"}},"required":["path","tablix_name","group_name","sort_expressions"],"type":"object"},"name":"set_column_group_sort"},{"description":"Set <Visibility> on a column-axis group's TablixMember. Accepts a Hidden expression and an optional ToggleItem (textbox name that toggles expand/collapse). Mirrors set_group_visibility but refuses up front if group_name is on the row axis.","inputSchema":{"additionalProperties":false,"properties":{"group_name":{"type":"string"},"path":{"type":"string"},"tablix_name":{"type":"string"},"toggle_textbox":{"type":["string","null"]},"visibility_expression":{"type":"string"}},"required":["path","tablix_name","group_name","visibility_expression"],"type":"object"},"name":"set_column_group_visibility"},{"description":"Append (or insert) a column into a tablix. column_name is the textbox name placed in the data row's new cell — must be unique report-wide. expression goes inside that textbox's TextRun (typically =Fields!X.Value). For a tablix with >= 2 rows the first row gets header_text (default = column_name) as a literal, middle rows get blank cells, and the last row gets expression. position is 0-indexed; default appends at end. width defaults to 1in. Inserts a matching top-level TablixMember in the column hierarchy at the same index.","inputSchema":{"additionalProperties":false,"properties":{"column_name":{"type":"string"},"expression":{"type":"string"},"header_text":{"type":["string","null"]},"path":{"type":"string"},"position":{"minimum":0,"type":["integer","null"]},"tablix_name":{"type":"string"},"width":{"type":["string","null"]}},"required":["path","tablix_name","column_name","expression"],"type":"object"},"name":"add_tablix_column"},{"description":"Remove the tablix column whose data-row cell holds a textbox named column_name. Drops the matching TablixColumn, removes the top-level TablixMember at that column index (only if it's a leaf, never a column group wrapper), and removes the cell at that index from every TablixRow. Errors if no row contains a textbox with the given name.","inputSchema":{"additionalProperties":false,"properties":{"column_name":{"type":"string"},"path":{"type":"string"},"tablix_name":{"type":"string"}},"required":["path","tablix_name","column_name"],"type":"object"},"name":"remove_tablix_column"},{"description":"Append a subtotal row to a row-axis group. aggregates is a list of {column, expression} entries; column matches against the Details row's textbox names (the same names add_tablix_column uses as column_name — NOT field names). expression is the aggregate (e.g. =Sum(Fields!X.Value)). Columns not listed get blank cells. position='footer' (default) appends; 'header' inserts at body row 1 (right after the group-header row). Group must have been added via add_row_group.","inputSchema":{"additionalProperties":false,"properties":{"aggregates":{"items":{"additionalProperties":false,"properties":{"column":{"type":"string"},"expression":{"type":"string"}},"required":["column","expression"],"type":"object"},"type":"array"},"group_name":{"type":"string"},"path":{"type":"string"},"position":{"default":"footer","enum":["header","footer"],"type":"string"},"tablix_name":{"type":"string"}},"required":["path","tablix_name","group_name","aggregates"],"type":"object"},"name":"add_subtotal_row"},{"description":"Column-axis mirror of add_subtotal_row. Adds a static TablixMember inside the column-group's <TablixMembers>, a new <TablixColumn> in TablixBody, and a cell at the new column index in every body row. aggregates is a list of {row, expression} entries where row is the 0-based body row index; rows not listed get blank cells. position='after' (default — canonical Grand Total slot, appends to the right of the column group) or 'before' (prepends to the group's left edge). width defaults to '1in'. Group must have been added via add_column_group.","inputSchema":{"additionalProperties":false,"properties":{"aggregates":{"items":{"additionalProperties":false,"properties":{"expression":{"type":"string"},"row":{"type":"integer"}},"required":["row","expression"],"type":"object"},"type":"array"},"group_name":{"type":"string"},"path":{"type":"string"},"position":{"default":"after","enum":["before","after"],"type":"string"},"tablix_name":{"type":"string"},"width":{"default":"1in","type":"string"}},"required":["path","tablix_name","group_name","aggregates"],"type":"object"},"name":"add_subtotal_column"},{"description":"Set <RowSpan> and/or <ColSpan> on a tablix cell. The cell is addressed by (row_index, column_name) where column_name is the textbox name inside the cell. At least one of row_span / col_span must be supplied; both must be >= 1. Pass 1 to explicitly reset a span. Replaces existing values if present.","inputSchema":{"additionalProperties":false,"properties":{"col_span":{"minimum":1,"type":["integer","null"]},"column_name":{"type":"string"},"path":{"type":"string"},"row_index":{"minimum":0,"type":"integer"},"row_span":{"minimum":1,"type":["integer","null"]},"tablix_name":{"type":"string"}},"required":["path","tablix_name","row_index","column_name"],"type":"object"},"name":"set_cell_span"},{"description":"Add a static (no-group) row to a tablix. Each cell holds literal text. cells is a list of strings, one per body column (left to right); shorter list = blank trailing cells, longer list errors. Cell textboxes are named row_name (col 0) and row_name_<col_index> (others) — unique report-wide so row_name must not clash with any existing textbox. position is 0-indexed; default appends. height defaults to 0.25in.","inputSchema":{"additionalProperties":false,"properties":{"cells":{"items":{"type":"string"},"type":["array","null"]},"height":{"type":["string","null"]},"path":{"type":"string"},"position":{"minimum":0,"type":["integer","null"]},"row_name":{"type":"string"},"tablix_name":{"type":"string"}},"required":["path","tablix_name","row_name"],"type":"object"},"name":"add_static_row"},{"description":"Add a static (no-group) column to a tablix. Each cell holds literal text. cells is a list of strings, one per body row (top to bottom); shorter list = blank trailing cells, longer list errors. Cell textboxes are named column_name (row 0) and column_name_<row_index> (others). position is 0-indexed; default appends. width defaults to 1in.","inputSchema":{"additionalProperties":false,"properties":{"cells":{"items":{"type":"string"},"type":["array","null"]},"column_name":{"type":"string"},"path":{"type":"string"},"position":{"minimum":0,"type":["integer","null"]},"tablix_name":{"type":"string"},"width":{"type":["string","null"]}},"required":["path","tablix_name","column_name"],"type":"object"},"name":"add_static_column"},{"description":"Move an existing named ReportItem inside <Body> to (top, left). Preserves all other properties (size, style, group structure). top and left are passed through verbatim — RDL accepts any size unit (2cm, 0.75in, 108pt). Errors if no body item by that name.","inputSchema":{"additionalProperties":false,"properties":{"left":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"top":{"type":"string"}},"required":["path","name","top","left"],"type":"object"},"name":"set_body_item_position"},{"description":"Move an existing named ReportItem inside <PageHeader> to (top, left). Errors if there is no <PageHeader> (call set_page_header first) or no item by that name.","inputSchema":{"additionalProperties":false,"properties":{"left":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"top":{"type":"string"}},"required":["path","name","top","left"],"type":"object"},"name":"set_header_item_position"},{"description":"Move an existing named ReportItem inside <PageFooter> to (top, left). Errors if there is no <PageFooter> (call set_page_footer first) or no item by that name.","inputSchema":{"additionalProperties":false,"properties":{"left":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"top":{"type":"string"}},"required":["path","name","top","left"],"type":"object"},"name":"set_footer_item_position"},{"description":"Resize an existing named ReportItem inside <Body>. At least one of width / height must be supplied; missing fields are left untouched. Same RDL size-string convention as the position tools.","inputSchema":{"additionalProperties":false,"properties":{"height":{"type":["string","null"]},"name":{"type":"string"},"path":{"type":"string"},"width":{"type":["string","null"]}},"required":["path","name"],"type":"object"},"name":"set_body_item_size"},{"description":"Resize a named item inside <PageHeader>. Mirrors set_body_item_size — at least one of width / height; missing fields untouched; idempotent ({changed: false} when nothing differs). Closes the v0.2 parity gap where only the body variant existed.","inputSchema":{"additionalProperties":false,"properties":{"height":{"type":["string","null"]},"name":{"type":"string"},"path":{"type":"string"},"width":{"type":["string","null"]}},"required":["path","name"],"type":"object"},"name":"set_header_item_size"},{"description":"Resize a named item inside <PageFooter>. Same shape as set_header_item_size.","inputSchema":{"additionalProperties":false,"properties":{"height":{"type":["string","null"]},"name":{"type":"string"},"path":{"type":"string"},"width":{"type":["string","null"]}},"required":["path","name"],"type":"object"},"name":"set_footer_item_size"},{"description":"List every named ReportItem at the top level of <Body>. Returns name, type (Tablix / Textbox / Image / Rectangle / Subreport / Chart / etc.), top, left, width, height. Use before set_body_item_position / set_body_item_size when you don't already know what's in the body.","inputSchema":{"additionalProperties":false,"properties":{"path":{"description":"Absolute path to the .rdl file to read.","type":"string"}},"required":["path"],"type":"object"},"name":"list_body_items"},{"description":"Same shape as list_body_items but for <PageHeader>.","inputSchema":{"additionalProperties":false,"properties":{"path":{"description":"Absolute path to the .rdl file to read.","type":"string"}},"required":["path"],"type":"object"},"name":"list_header_items"},{"description":"Same shape as list_body_items but for <PageFooter>.","inputSchema":{"additionalProperties":false,"properties":{"path":{"description":"Absolute path to the .rdl file to read.","type":"string"}},"required":["path"],"type":"object"},"name":"list_footer_items"},{"description":"Return effective state of a named Textbox: position, size, Visibility, CanGrow, CanShrink, plus a nested style dict that mirrors set_textbox_style's routing — {box: {BackgroundColor, VerticalAlign, padding, ...}, border: {Style, Color, Width}, paragraph: {TextAlign}, run: {FontFamily, FontSize, FontWeight, Color, Format, ...}}. Empty branches are dropped. runs[] entries each carry their own per-run style. Searches the entire report; tablix-cell textboxes have None for top/left/width/height. Top-level positioned items with a missing <Top> or <Left> coerce to '0in' (RDL default).","inputSchema":{"additionalProperties":false,"properties":{"name":{"type":"string"},"path":{"type":"string"}},"required":["path","name"],"type":"object"},"name":"get_textbox"},{"description":"Return effective state of a named Image: position, size, Source (External / Embedded / Database), Value, Sizing (AutoSize / Fit / FitProportional / Clip), MIMEType, Style, Visibility.","inputSchema":{"additionalProperties":false,"properties":{"name":{"type":"string"},"path":{"type":"string"}},"required":["path","name"],"type":"object"},"name":"get_image"},{"description":"Return effective state of a named Rectangle: position, size, names of contained ReportItems, Style, Visibility.","inputSchema":{"additionalProperties":false,"properties":{"name":{"type":"string"},"path":{"type":"string"}},"required":["path","name"],"type":"object"},"name":"get_rectangle"},{"description":"Return effective state of a named Chart: position, size, dataset, palette, series list (name/type/subtype/value expression/color), category groups (name/expression/label), axes (category and value), legend, title, Style, Visibility. Symmetric with get_textbox / get_image / get_rectangle.","inputSchema":{"additionalProperties":false,"properties":{"name":{"type":"string"},"path":{"type":"string"}},"required":["path","name"],"type":"object"},"name":"get_chart"},{"description":"Copy the report to <path>.bak.<UTC-timestamp>. Original is untouched. Cheap explicit checkpoint to call before a destructive batch (remove_*, rename_parameter, etc.). Returns the backup path. Set PBIRB_MCP_AUTO_BACKUP=1 to opt into automatic backups before destructive ops (off by default).","inputSchema":{"additionalProperties":false,"properties":{"path":{"description":"Absolute path to the .rdl file to read.","type":"string"}},"required":["path"],"type":"object"},"name":"backup_report"},{"description":"Restore a backup file over its original target. target_path defaults to the path implied by the backup's <target>.bak.<UTC-timestamp> filename; pass target_path explicitly when the backup name doesn't match that shape. Refuses if target mtime is newer than backup (staleness guard) — pass force=True to override. Returns {source, restored_to, bytes_restored}.","inputSchema":{"additionalProperties":false,"properties":{"backup_path":{"type":"string"},"force":{"default":false,"type":"boolean"},"target_path":{"default":null,"type":["string","null"]}},"required":["backup_path"],"type":"object"},"name":"restore_from_backup"},{"description":"Write the <Prompt> text on a ReportParameter. Empty string clears the <Prompt> element entirely; pass a single space ' ' for blank-but-present.","inputSchema":{"additionalProperties":false,"properties":{"name":{"type":"string"},"path":{"type":"string"},"prompt":{"type":"string"}},"required":["path","name","prompt"],"type":"object"},"name":"set_parameter_prompt"},{"description":"Set <DataType> on a ReportParameter. type ∈ {Boolean, DateTime, Integer, Float, String}. Rejects with ValueError if any existing literal default value would be incompatible with the new type — fix defaults first via set_parameter_default_values, then retry.","inputSchema":{"additionalProperties":false,"properties":{"name":{"type":"string"},"path":{"type":"string"},"type":{"enum":["Boolean","DateTime","Integer","Float","String"],"type":"string"}},"required":["path","name","type"],"type":"object"},"name":"set_parameter_type"},{"description":"Create a new ReportParameter with a minimal valid declaration. Appends to <ReportParameters> (creating it if absent). Pair with set_parameter_available_values / set_parameter_default_values afterwards for value lists. Booleans are only emitted when an explicit value is supplied.","inputSchema":{"additionalProperties":false,"properties":{"allow_blank":{"type":["boolean","null"]},"allow_null":{"type":["boolean","null"]},"hidden":{"type":["boolean","null"]},"multi_value":{"type":["boolean","null"]},"name":{"type":"string"},"path":{"type":"string"},"prompt":{"type":["string","null"]},"type":{"enum":["Boolean","DateTime","Integer","Float","String"],"type":"string"}},"required":["path","name","type"],"type":"object"},"name":"add_parameter"},{"description":"Remove a ReportParameter by name. Refuses (lists offending locators) if the parameter is still referenced anywhere in the report by Parameters!<name>.Value or .Label. Pass force=True to remove anyway.","inputSchema":{"additionalProperties":false,"properties":{"force":{"default":false,"type":"boolean"},"name":{"type":"string"},"path":{"type":"string"}},"required":["path","name"],"type":"object"},"name":"remove_parameter"},{"description":"Rename a ReportParameter and rewrite every textual occurrence of Parameters!<old_name>.Value / .Label across the entire report. Case-sensitive. Atomic: collects all matches first, then commits. Errors if new_name already exists or equals old_name.","inputSchema":{"additionalProperties":false,"properties":{"new_name":{"type":"string"},"old_name":{"type":"string"},"path":{"type":"string"}},"required":["path","old_name","new_name"],"type":"object"},"name":"rename_parameter"},{"description":"Bring <ReportParametersLayout>/<GridLayoutDefinition>/<CellDefinitions> into sync with <ReportParameters>. Drops cells whose ParameterName no longer exists; appends cells for parameters that have no entry, placed at the next free (row, col) slot. add_parameter / remove_parameter / rename_parameter call this internally; the standalone tool is for repairing legacy reports authored before v0.3.0 where the layout drifted. No-op when the report has no <ReportParametersLayout>. Returns {added, removed}.","inputSchema":{"additionalProperties":false,"properties":{"path":{"description":"Absolute path to the .rdl file to read.","type":"string"}},"required":["path"],"type":"object"},"name":"sync_parameter_layout"},{"description":"Set <Visibility> on the tablix's Details group, optionally with a ToggleItem textbox name. Use to hide detail rows by expression without restructuring the row hierarchy.","inputSchema":{"additionalProperties":false,"properties":{"expression":{"type":"string"},"path":{"type":"string"},"tablix_name":{"type":"string"},"toggle_textbox":{"type":["string","null"]}},"required":["path","tablix_name","expression"],"type":"object"},"name":"set_detail_row_visibility"},{"description":"Set the Height of the Nth body row (0-indexed) in a tablix. Accepts any RDL size string ('0.25in', '1cm', '12pt').","inputSchema":{"additionalProperties":false,"properties":{"height":{"type":"string"},"path":{"type":"string"},"row_index":{"minimum":0,"type":"integer"},"tablix_name":{"type":"string"}},"required":["path","tablix_name","row_index","height"],"type":"object"},"name":"set_row_height"},{"description":"Remove a filter by index. Filters are anonymous in RDL, so use list_tablix_filters first to find the right index. Removing the last filter also drops the empty <Filters/> block.","inputSchema":{"additionalProperties":false,"properties":{"filter_index":{"minimum":0,"type":"integer"},"path":{"type":"string"},"tablix_name":{"type":"string"}},"required":["path","tablix_name","filter_index"],"type":"object"},"name":"remove_tablix_filter"},{"description":"Update <Page> dimensions, margins, and column count on the first ReportSection. All fields are optional — only what's passed gets written. columns=1 strips the <Columns/> element.","inputSchema":{"additionalProperties":false,"properties":{"columns":{"minimum":1,"type":["integer","null"]},"margin_bottom":{"type":["string","null"]},"margin_left":{"type":["string","null"]},"margin_right":{"type":["string","null"]},"margin_top":{"type":["string","null"]},"page_height":{"type":["string","null"]},"page_width":{"type":["string","null"]},"path":{"type":"string"}},"required":["path"],"type":"object"},"name":"set_page_setup"},{"description":"Set page orientation by swapping PageHeight and PageWidth when the current orientation doesn't match the requested one. Idempotent. Accepts 'Portrait' or 'Landscape'.","inputSchema":{"additionalProperties":false,"properties":{"orientation":{"enum":["Portrait","Landscape"],"type":"string"},"path":{"type":"string"}},"required":["path","orientation"],"type":"object"},"name":"set_page_orientation"},{"description":"Set the body's rendering region inside the page. <Body>/<Height> and <ReportSection>/<Width> (the sibling of <Body>) — both are RDL size strings (e.g. '14in', '9in', '297mm'). Either or both kwargs required. Distinct from set_page_setup (which sets the paper chrome <Page>/<PageWidth>/<PageHeight>) and set_body_item_size (size of items inside the body). Use this when a wide tablix or chart needs the body region expanded — without it the right edge is clipped at preview time. Idempotent: same value → empty changed. Returns {kind: 'Body', changed: list[str]}.","inputSchema":{"additionalProperties":false,"properties":{"height":{"default":null,"type":["string","null"]},"path":{"type":"string"},"width":{"default":null,"type":["string","null"]}},"required":["path"],"type":"object"},"name":"set_body_size"},{"description":"Create or update <PageHeader>: height plus PrintOnFirstPage / PrintOnLastPage flags. All fields optional — only what's passed gets written.","inputSchema":{"additionalProperties":false,"properties":{"height":{"type":["string","null"]},"path":{"type":"string"},"print_on_first_page":{"type":["boolean","null"]},"print_on_last_page":{"type":["boolean","null"]}},"required":["path"],"type":"object"},"name":"set_page_header"},{"description":"Same as set_page_header, for <PageFooter>.","inputSchema":{"additionalProperties":false,"properties":{"height":{"type":["string","null"]},"path":{"type":"string"},"print_on_first_page":{"type":["boolean","null"]},"print_on_last_page":{"type":["boolean","null"]}},"required":["path"],"type":"object"},"name":"set_page_footer"},{"description":"Add a Textbox to <PageHeader>/<ReportItems>. text accepts static strings or RDL expressions (=Parameters!DateFrom.Value). Pass raw text — encoding is handled; don't pre-encode XML entities (use `&` not `&amp;`, including for the VB.NET string-concat operator in expressions).","inputSchema":{"additionalProperties":false,"properties":{"height":{"type":"string"},"left":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"text":{"description":"Static text or RDL expression (=...).","type":"string"},"top":{"type":"string"},"width":{"type":"string"}},"required":["path","name","text","top","left","width","height"],"type":"object"},"name":"add_header_textbox"},{"description":"Same as add_header_textbox, for <PageFooter>.","inputSchema":{"additionalProperties":false,"properties":{"height":{"type":"string"},"left":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"text":{"description":"Static text or RDL expression (=...).","type":"string"},"top":{"type":"string"},"width":{"type":"string"}},"required":["path","name","text","top","left","width","height"],"type":"object"},"name":"add_footer_textbox"},{"description":"Add an Image to <PageHeader>/<ReportItems>. image_source is External (URL in value), Embedded (EmbeddedImage Name in value), or Database (=Fields!Photo.Value-style expression).","inputSchema":{"additionalProperties":false,"properties":{"height":{"type":"string"},"image_source":{"enum":["External","Embedded","Database"],"type":"string"},"left":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"top":{"type":"string"},"value":{"description":"URL for External, embedded-image name for Embedded, or =Fields!X.Value for Database.","type":"string"},"width":{"type":"string"}},"required":["path","name","image_source","value","top","left","width","height"],"type":"object"},"name":"add_header_image"},{"description":"Same as add_header_image, for <PageFooter>.","inputSchema":{"additionalProperties":false,"properties":{"height":{"type":"string"},"image_source":{"enum":["External","Embedded","Database"],"type":"string"},"left":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"top":{"type":"string"},"value":{"description":"URL for External, embedded-image name for Embedded, or =Fields!X.Value for Database.","type":"string"},"width":{"type":"string"}},"required":["path","name","image_source","value","top","left","width","height"],"type":"object"},"name":"add_footer_image"},{"description":"Remove a named Textbox or Image from <PageHeader>/<ReportItems>. Empties the ReportItems block when the last item leaves.","inputSchema":{"additionalProperties":false,"properties":{"name":{"type":"string"},"path":{"type":"string"}},"required":["path","name"],"type":"object"},"name":"remove_header_item"},{"description":"Same as remove_header_item, for <PageFooter>.","inputSchema":{"additionalProperties":false,"properties":{"name":{"type":"string"},"path":{"type":"string"}},"required":["path","name"],"type":"object"},"name":"remove_footer_item"},{"description":"Set styling on a named Textbox. Properties route to the right nested Style node automatically: background_color, border_*, vertical_align, padding_*, writing_mode go on Textbox/Style; text_align on Paragraph/Style; font_*, color, format on TextRun/Style; can_grow / can_shrink go DIRECTLY on Textbox (not inside Style). All fields optional — only what's passed gets written. Cell-level styling: every tablix cell is a Textbox with a unique name, so use this tool with the cell's textbox name (e.g. 'HeaderAmount').","inputSchema":{"additionalProperties":false,"properties":{"background_color":{"type":["string","null"]},"border_color":{"type":["string","null"]},"border_style":{"description":"None | Solid | Dotted | Dashed | Double.","type":["string","null"]},"border_width":{"type":["string","null"]},"can_grow":{"description":"Allow textbox to grow vertically when content exceeds the height. Direct Textbox child, not Style.","type":["boolean","null"]},"can_shrink":{"description":"Allow textbox to shrink when content is shorter than the height. Direct Textbox child, not Style.","type":["boolean","null"]},"color":{"description":"Text color — '#RRGGBB' or named.","type":["string","null"]},"font_family":{"type":["string","null"]},"font_size":{"description":"RDL size, e.g. '11pt'.","type":["string","null"]},"font_weight":{"description":"Normal | Bold | Lighter | ... or numeric.","type":["string","null"]},"format":{"description":"Number/date format (e.g. '#,0.00', 'C2', 'd').","type":["string","null"]},"padding_bottom":{"type":["string","null"]},"padding_left":{"type":["string","null"]},"padding_right":{"type":["string","null"]},"padding_top":{"description":"RDL size (e.g. '2pt', '0.05in').","type":["string","null"]},"path":{"type":"string"},"text_align":{"description":"Left | Center | Right | Justify | General.","type":["string","null"]},"textbox_name":{"type":"string"},"vertical_align":{"description":"Top | Middle | Bottom.","type":["string","null"]},"writing_mode":{"description":"Horizontal | Vertical | Rotate270 — text orientation. Useful for narrow column headers.","type":["string","null"]}},"required":["path","textbox_name"],"type":"object"},"name":"set_textbox_style"},{"description":"Replace a textbox's content with multiple <TextRun> children for mixed styling within one display — e.g. '**Asset(s):** value' with a bold prefix + regular value in a single textbox. Each run is a dict with required 'text' and optional font_family / font_size / font_weight / font_style / color / format / text_decoration. Replaces the entire <Paragraphs> subtree (single-paragraph in v0.3; multi-paragraph deferred). Round-trip contract: get_textbox.runs[] returns the same shape this tool writes. Idempotent — identical input is a no-op short-circuit. Returns {textbox, kind, runs, changed}. Pass raw text in each run's `text` — encoding is handled; don't pre-encode XML entities (use `&` not `&amp;`, including for the VB.NET string-concat operator).","inputSchema":{"additionalProperties":false,"properties":{"path":{"type":"string"},"runs":{"items":{"additionalProperties":false,"properties":{"color":{"type":"string"},"font_family":{"type":"string"},"font_size":{"type":"string"},"font_style":{"type":"string"},"font_weight":{"type":"string"},"format":{"type":"string"},"text":{"type":"string"},"text_decoration":{"type":"string"}},"required":["text"],"type":"object"},"minItems":1,"type":"array"},"textbox_name":{"type":"string"}},"required":["path","textbox_name","runs"],"type":"object"},"name":"set_textbox_runs"},{"description":"Replace the text content of a single-run textbox. value can be raw text or an =expression. Use this for the everyday 'change the textbox content' case (swap a literal label, update a stale parameter reference, replace a broken aggregate). Refuses with a redirect to set_textbox_runs when the textbox has multiple text runs (multi-run content needs the rich-text editor). Idempotent: identical value → {changed: false} no-op. Returns {textbox, kind, changed}. Pass raw text — encoding is handled; don't pre-encode XML entities (use `&` not `&amp;`, including for the VB.NET string-concat operator in expressions).","inputSchema":{"additionalProperties":false,"properties":{"path":{"type":"string"},"textbox_name":{"type":"string"},"value":{"type":"string"}},"required":["path","textbox_name","value"],"type":"object"},"name":"set_textbox_value"},{"description":"Apply the same style kwargs to every named textbox in one call. Same kwarg surface as set_textbox_style. Missing names land in skipped rather than raising. Returns {textboxes, skipped, changed} where changed is the union of sub-paths affected across all textboxes. Pair with find_textboxes_by_style to discover names by current style.","inputSchema":{"additionalProperties":false,"properties":{"background_color":{"type":["string","null"]},"border_color":{"type":["string","null"]},"border_style":{"type":["string","null"]},"border_width":{"type":["string","null"]},"can_grow":{"type":["boolean","null"]},"can_shrink":{"type":["boolean","null"]},"color":{"type":["string","null"]},"font_family":{"type":["string","null"]},"font_size":{"type":["string","null"]},"font_weight":{"type":["string","null"]},"format":{"type":["string","null"]},"padding_bottom":{"type":["string","null"]},"padding_left":{"type":["string","null"]},"padding_right":{"type":["string","null"]},"padding_top":{"type":["string","null"]},"path":{"type":"string"},"text_align":{"type":["string","null"]},"textbox_names":{"items":{"type":"string"},"type":"array"},"vertical_align":{"type":["string","null"]},"writing_mode":{"type":["string","null"]}},"required":["path","textbox_names"],"type":"object"},"name":"set_textbox_style_bulk"},{"description":"Search for textboxes matching one or more style filters. Filters AND together (every supplied filter must match). Returns [{name, location, matched_fields}] where location is best-effort 'body' / 'header' / 'footer' / 'tablix:<name>' / 'rectangle:<name>'. Returns [] when no filters supplied. Pair with set_textbox_style_bulk for discovery+apply patterns (e.g. 'recolor every red textbox').","inputSchema":{"additionalProperties":false,"properties":{"background_color":{"type":"string"},"border_color":{"type":"string"},"border_style":{"type":"string"},"border_width":{"type":"string"},"color":{"type":"string"},"font_family":{"type":"string"},"font_size":{"type":"string"},"font_style":{"type":"string"},"font_weight":{"type":"string"},"format":{"type":"string"},"padding_bottom":{"type":"string"},"padding_left":{"type":"string"},"padding_right":{"type":"string"},"padding_top":{"type":"string"},"path":{"type":"string"},"text_align":{"type":"string"},"text_decoration":{"type":"string"},"vertical_align":{"type":"string"},"writing_mode":{"type":"string"}},"required":["path"],"type":"object"},"name":"find_textboxes_by_style"},{"description":"Find every Textbox whose <Value> text matches a Python regex pattern. Searches Body / PageHeader / PageFooter. A textbox with multiple matching runs surfaces once per match. Returns [{textbox, value, region}]. Useful for finding stale =Parameters!Old.Value references after rename_parameter, or any cross-cutting expression edit.","inputSchema":{"additionalProperties":false,"properties":{"path":{"type":"string"},"pattern":{"description":"Python regex (re.search); not RDL/SQL glob.","type":"string"}},"required":["path","pattern"],"type":"object"},"name":"find_textbox_by_value"},{"description":"Apply the same style kwargs to every cell in a tablix row in ONE call. Replaces the 12-individual-set_textbox_style-calls-per-row pattern. row accepts: integer (0-based body row index), 'header' (first leaf with KeepWithGroup=After — the column header row), 'details' (the Details leaf row), '<group>_header' (header row of a named row group), '<group>_footer' (footer row when present, e.g. after add_subtotal_row). Same style kwargs as set_textbox_style (font_*, color, background_color, border_*, padding_*, writing_mode, can_grow, can_shrink, etc.). Delegates writes to set_textbox_style_bulk. Returns {tablix, row, row_index, kind, cells, changed, skipped}.","inputSchema":{"additionalProperties":false,"properties":{"background_color":{"type":["string","null"]},"border_color":{"type":["string","null"]},"border_style":{"type":["string","null"]},"border_width":{"type":["string","null"]},"can_grow":{"type":["boolean","null"]},"can_shrink":{"type":["boolean","null"]},"color":{"type":["string","null"]},"font_family":{"type":["string","null"]},"font_size":{"type":["string","null"]},"font_weight":{"type":["string","null"]},"format":{"type":["string","null"]},"padding_bottom":{"type":["string","null"]},"padding_left":{"type":["string","null"]},"padding_right":{"type":["string","null"]},"padding_top":{"type":["string","null"]},"path":{"type":"string"},"row":{"description":"Integer index, or one of: 'header', 'details', '<group>_header', '<group>_footer'.","oneOf":[{"minimum":0,"type":"integer"},{"type":"string"}]},"tablix_name":{"type":"string"},"text_align":{"type":["string","null"]},"vertical_align":{"type":["string","null"]},"writing_mode":{"type":["string","null"]}},"required":["path","tablix_name","row"],"type":"object"},"name":"style_tablix_row"},{"description":"Add a Textbox to <Body>/<ReportItems>. text accepts static strings or RDL expressions (e.g. =Globals!ReportName). Coexists with the existing tablix; rejects names already in use. Pass raw text — encoding is handled; don't pre-encode XML entities (use `&` not `&amp;`, including for the VB.NET string-concat operator in expressions).","inputSchema":{"additionalProperties":false,"properties":{"height":{"type":"string"},"left":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"text":{"description":"Static text or RDL expression (=...).","type":"string"},"top":{"type":"string"},"width":{"type":"string"}},"required":["path","name","text","top","left","width","height"],"type":"object"},"name":"add_body_textbox"},{"description":"Add an Image to <Body>/<ReportItems>. image_source: External (URL), Embedded (EmbeddedImage Name), Database (=Fields!Photo.Value).","inputSchema":{"additionalProperties":false,"properties":{"height":{"type":"string"},"image_source":{"enum":["External","Embedded","Database"],"type":"string"},"left":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"top":{"type":"string"},"value":{"type":"string"},"width":{"type":"string"}},"required":["path","name","image_source","value","top","left","width","height"],"type":"object"},"name":"add_body_image"},{"description":"Remove a named item (Textbox, Image, or Tablix) from <Body>/<ReportItems>. Destructive but explicit — raises if the name doesn't match anything.","inputSchema":{"additionalProperties":false,"properties":{"name":{"type":"string"},"path":{"type":"string"}},"required":["path","name"],"type":"object"},"name":"remove_body_item"},{"description":"Build and append a basic Tablix to <Body>/<ReportItems>. One column per name in `columns`; header row gets the column name as a static label, detail row binds to =Fields!<column>.Value. dataset_name must already exist. `width` is the tablix outer width — each column defaults to 1in regardless, so for a 3-column tablix the columns sum to 3in even if you pass width=10cm. Resize columns afterwards via direct edits or future column-width tools.","inputSchema":{"additionalProperties":false,"properties":{"columns":{"items":{"type":"string"},"minItems":1,"type":"array"},"dataset_name":{"type":"string"},"height":{"type":"string"},"left":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"top":{"type":"string"},"width":{"type":"string"}},"required":["path","name","dataset_name","columns","top","left","width","height"],"type":"object"},"name":"insert_tablix_from_template"},{"description":"Build and append a basic Column chart to <Body>/<ReportItems>. Single category axis grouped by category_field; single Y series Sum(Fields!<value_field>.Value). dataset_name must already exist. Change <Type> post-insert (e.g. to Bar / Line / Pie) by editing the chart directly.","inputSchema":{"additionalProperties":false,"properties":{"category_field":{"type":"string"},"dataset_name":{"type":"string"},"height":{"type":"string"},"left":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"top":{"type":"string"},"value_field":{"type":"string"},"width":{"type":"string"}},"required":["path","name","dataset_name","category_field","value_field","top","left","width","height"],"type":"object"},"name":"insert_chart_from_template"},{"description":"Append a new <ChartSeries> to a named chart. value_field is the dataset field whose Sum becomes the Y expression (=Sum(Fields!<value_field>.Value)). series_type defaults to Column; combine series of different types in one chart for combo charts (e.g. Bar + Line). series_subtype defaults to Plain. Refuses if series_name already exists.","inputSchema":{"additionalProperties":false,"properties":{"chart_name":{"type":"string"},"path":{"type":"string"},"series_name":{"type":"string"},"series_subtype":{"description":"Plain / Stacked / PercentStacked / Smooth / Exploded / SmoothLine / 100 / Line / Spline","type":"string"},"series_type":{"description":"Column / Bar / Line / Area / Pie / Doughnut / Range / Scatter / Bubble / Stock / Polar / Radar / Funnel / Pyramid","type":"string"},"value_field":{"type":"string"}},"required":["path","chart_name","series_name","value_field"],"type":"object"},"name":"add_chart_series"},{"description":"Remove a named <ChartSeries> from a chart. Refuses to remove the last remaining series (use remove_body_item to drop the whole chart instead). Returns {chart, removed, remaining}.","inputSchema":{"additionalProperties":false,"properties":{"chart_name":{"type":"string"},"path":{"type":"string"},"series_name":{"type":"string"}},"required":["path","chart_name","series_name"],"type":"object"},"name":"remove_chart_series"},{"description":"Update <Type> and optionally <Subtype> on a named ChartSeries. Combo charts work by setting different types per series in the same chart (e.g. one Bar series and one Line series). v0.4: series_subtype defaults to null/None — omit to PRESERVE the existing subtype. Pass 'Stacked' / 'PercentStacked' / 'Plain' / etc. to override. Pre-v0.4 always wrote 'Plain' by default, silently resetting stacked-bar charts on type-only edits. Returns {chart, series, kind, changed: list[str]} — empty when inputs match existing values.","inputSchema":{"additionalProperties":false,"properties":{"chart_name":{"type":"string"},"path":{"type":"string"},"series_name":{"type":"string"},"series_subtype":{"default":null,"type":["string","null"]},"series_type":{"type":"string"}},"required":["path","chart_name","series_name","series_type"],"type":"object"},"name":"set_chart_series_type"},{"description":"Promote a chart's static ChartMember to a dynamic-fanout series. Writes <ChartSeriesHierarchy>/<ChartMembers>/<ChartMember>/<Group Name='<series>_Group'>/<GroupExpressions>/<GroupExpression>. At render time, one rendered series is produced per distinct value of the group expression — the '13 violation types unknown at design time' fan-out. group_field='Type' is a shorthand for =Fields!Type.Value; group_expression accepts any VB.NET. Mutually exclusive. replace=False (default) refuses if the ChartMember already has a <Group>; pass replace=True to overwrite. Operates on the FIRST ChartMember in the hierarchy (v0.4 commit 21 scope; multi-member chains aren't reachable from any v0.4 tool). Returns {chart, series, kind: 'ChartGroup', group_name, expression, changed}.","inputSchema":{"additionalProperties":false,"properties":{"chart_name":{"type":"string"},"group_expression":{"default":null,"type":["string","null"]},"group_field":{"default":null,"type":["string","null"]},"path":{"type":"string"},"replace":{"default":false,"type":"boolean"},"series_name":{"type":"string"}},"required":["path","chart_name","series_name"],"type":"object"},"name":"set_chart_series_grouping"},{"description":"Configure a chart axis: title (Caption), format (numeric/date format string in <Style>/<Format>), min/max range, log_scale, interval, visible. axis ∈ {Category, Value}; axis_name defaults to 'Primary' (the only axis the template emits — pass a real name for secondary axes). All field args are optional; pass '' to clear an element. Returns {chart, axis, axis_name, kind, changed: list[str]} with the affected sub-element names.","inputSchema":{"additionalProperties":false,"properties":{"axis":{"description":"Category or Value","enum":["Category","Value"],"type":"string"},"axis_name":{"default":"Primary","type":"string"},"chart_name":{"type":"string"},"format":{"description":"Numeric/date format, e.g. '#,0.00' or 'MMM yyyy'.","type":"string"},"interval":{"type":"string"},"log_scale":{"type":"boolean"},"max":{"type":"string"},"min":{"type":"string"},"path":{"type":"string"},"title":{"type":"string"},"visible":{"type":"boolean"}},"required":["path","chart_name","axis"],"type":"object"},"name":"set_chart_axis"},{"description":"Configure a chart legend: position (TopLeft / TopCenter / TopRight / LeftTop / LeftCenter / LeftBottom / RightTop / RightCenter / RightBottom / BottomLeft / BottomCenter / BottomRight) and visible (writes <Hidden>true|false</Hidden>). legend_name defaults to 'Default' (the only one the template emits). Returns {chart, legend, kind, changed: list[str]}; no-op short-circuit when nothing supplied.","inputSchema":{"additionalProperties":false,"properties":{"chart_name":{"type":"string"},"legend_name":{"default":"Default","type":"string"},"path":{"type":"string"},"position":{"type":"string"},"visible":{"type":"boolean"}},"required":["path","chart_name"],"type":"object"},"name":"set_chart_legend"},{"description":"Configure <ChartDataLabel> on one or all series in a chart. When series_name is None, the change applies to every series; otherwise only the named series. visible writes <Visible>true|false</Visible>; visible_expression writes the same element with a VB.NET =IIf(...) expression (mutually exclusive with visible). format writes <Style>/<Format>; pass '' to clear. v0.4: position ∈ Auto/Top/TopLeft/TopCenter/TopRight/Left/Center/Right/BottomLeft/BottomCenter/BottomRight/Bottom/Outside; use_value_as_label ∈ true/false; font_weight + color write to <Style>/<FontWeight> and <Style>/<Color> (pass '' to clear). Returns {chart, series, kind, changed}.","inputSchema":{"additionalProperties":false,"properties":{"chart_name":{"type":"string"},"color":{"type":"string"},"font_weight":{"type":"string"},"format":{"type":"string"},"path":{"type":"string"},"position":{"enum":["Auto","Top","TopLeft","TopCenter","TopRight","Left","Center","Right","BottomLeft","BottomCenter","BottomRight","Bottom","Outside"],"type":"string"},"series_name":{"type":"string"},"use_value_as_label":{"type":"boolean"},"visible":{"type":"boolean"},"visible_expression":{"type":"string"}},"required":["path","chart_name"],"type":"object"},"name":"set_chart_data_labels"},{"description":"Set <Palette> on a chart. palette ∈ Default / EarthTones / Excel / GrayScale / Light / Pastel / SemiTransparent / Berry / Chocolate / Fire / SeaGreen / BrightPastel. Pass '' to clear (RB falls back to its built-in default palette). Returns {chart, kind, changed: bool}.","inputSchema":{"additionalProperties":false,"properties":{"chart_name":{"type":"string"},"palette":{"type":"string"},"path":{"type":"string"}},"required":["path","chart_name","palette"],"type":"object"},"name":"set_chart_palette"},{"description":"Write <Color> into a named series's <Style> block, overriding the chart palette for just that series. color accepts a named color ('Red'), a hex string ('#FF0000'), or an =expression. Pass '' to clear (series falls back to the palette). Returns {chart, series, kind, changed: bool}.","inputSchema":{"additionalProperties":false,"properties":{"chart_name":{"type":"string"},"color":{"type":"string"},"path":{"type":"string"},"series_name":{"type":"string"}},"required":["path","chart_name","series_name","color"],"type":"object"},"name":"set_series_color"},{"description":"Update <ChartTitle>/<Caption>. text can be literal text or an =expression. title_name defaults to 'Default' (the only title the template emits). Returns {chart, title, kind, changed: bool}.","inputSchema":{"additionalProperties":false,"properties":{"chart_name":{"type":"string"},"path":{"type":"string"},"text":{"type":"string"},"title_name":{"default":"Default","type":"string"}},"required":["path","chart_name","text"],"type":"object"},"name":"set_chart_title"},{"description":"Set or clear <ValidValues> on a report parameter. source='static' with a non-empty static_values writes a list of <ParameterValue> entries (each entry can be a string or {value, label} dict). source='static' with static_values=[] or omitted CLEARS the <ValidValues> element entirely (mirrors set_parameter_prompt('') and returns cleared=true). source='query' writes a <DataSetReference> to a lookup dataset. Replaces any existing <ValidValues> block.","inputSchema":{"additionalProperties":false,"properties":{"name":{"type":"string"},"path":{"type":"string"},"query_dataset":{"type":["string","null"]},"query_label_field":{"type":["string","null"]},"query_value_field":{"type":["string","null"]},"source":{"enum":["static","query"],"type":"string"},"static_values":{"items":{"oneOf":[{"type":"string"},{"additionalProperties":false,"properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["value"],"type":"object"}]},"type":["array","null"]}},"required":["path","name","source"],"type":"object"},"name":"set_parameter_available_values"},{"description":"Set or clear <DefaultValue> on a report parameter. source='static' with a non-empty static_values writes a <Values> list of expressions. source='static' with static_values=[] or omitted CLEARS the <DefaultValue> element entirely (mirrors set_parameter_prompt('') and returns cleared=true). source='query' writes a <DataSetReference> with ValueField only (no LabelField — defaults are values, not display strings). Replaces any existing block.","inputSchema":{"additionalProperties":false,"properties":{"name":{"type":"string"},"path":{"type":"string"},"query_dataset":{"type":["string","null"]},"query_value_field":{"type":["string","null"]},"source":{"enum":["static","query"],"type":"string"},"static_values":{"items":{"type":"string"},"type":["array","null"]}},"required":["path","name","source"],"type":"object"},"name":"set_parameter_default_values"},{"description":"Toggle the four boolean flags on a report parameter: multi_value, hidden, allow_null (writes <Nullable>), allow_blank. Each is independently optional. With no flags passed it's a no-op. Cascading parameters are NOT a flag — use set_parameter_available_values(source='query') + add_query_parameter on the lookup dataset to wire a dependency on another parameter.","inputSchema":{"additionalProperties":false,"properties":{"allow_blank":{"type":["boolean","null"]},"allow_null":{"type":["boolean","null"]},"hidden":{"type":["boolean","null"]},"multi_value":{"type":["boolean","null"]},"name":{"type":"string"},"path":{"type":"string"}},"required":["path","name"],"type":"object"},"name":"update_parameter_advanced"},{"description":"Read a real image file off disk, base64-encode it, and store it under <EmbeddedImages>. Reference it later with image_source='Embedded' + value=<name>. Supported MIME types: image/bmp, image/gif, image/jpeg, image/png, image/x-png. The file's magic bytes are sniffed and must match mime_type — claiming PNG bytes as image/jpeg is rejected here rather than letting Report Builder fail at preview time.","inputSchema":{"additionalProperties":false,"properties":{"image_path":{"description":"Filesystem path to the source image.","type":"string"},"mime_type":{"enum":["image/bmp","image/gif","image/jpeg","image/png","image/x-png"],"type":"string"},"name":{"type":"string"},"path":{"type":"string"}},"required":["path","name","mime_type","image_path"],"type":"object"},"name":"add_embedded_image"},{"description":"List embedded images in the report by name and MIME type. Returns an empty list when <EmbeddedImages> is absent.","inputSchema":{"additionalProperties":false,"properties":{"path":{"type":"string"}},"required":["path"],"type":"object"},"name":"list_embedded_images"},{"description":"Remove a named embedded image. Refuses (lists offending Image elements) when any <Image Source=\"Embedded\"><Value>=name> still references it; pass force=True to remove anyway and accept the dangling references. Drops the empty <EmbeddedImages/> block when removing the last entry.","inputSchema":{"additionalProperties":false,"properties":{"force":{"default":false,"type":"boolean"},"name":{"type":"string"},"path":{"type":"string"}},"required":["path","name"],"type":"object"},"name":"remove_embedded_image"},{"description":"Zebra-stripe a tablix's detail row by writing BackgroundColor=IIf(RowNumber(Nothing) Mod 2, color_a, color_b) on every detail cell's Textbox. Walks the row hierarchy to find the Details leaf — works after add_row_group nests the structure deeper. Replaces any existing BackgroundColor.","inputSchema":{"additionalProperties":false,"properties":{"color_a":{"description":"Odd-row color, e.g. '#F2F2F2'.","type":"string"},"color_b":{"description":"Even-row color, e.g. '#FFFFFF'.","type":"string"},"path":{"type":"string"},"tablix_name":{"type":"string"}},"required":["path","tablix_name","color_a","color_b"],"type":"object"},"name":"set_alternating_row_color"},{"description":"Color every cell of a tablix's detail row based on the value of one of its fields. Builds a Switch(...) expression mapping field values to colors and writes it as BackgroundColor on every detail cell. value_expression is the field reference (e.g. 'Fields!Status.Value' — a leading '=' is accepted). color_map is an ordered dict of value->color (e.g. {\"Red\":\"#FF0000\",\"Yellow\":\"#FFFF00\"}); first match wins. Unmatched values fall back to default_color (default 'Transparent'). When case_sensitive is False (default), wraps the field reference in UCase() and uppercases the keys for case-insensitive matching. Walks the row hierarchy to find the Details leaf — works after add_row_group nests the structure. Replaces any existing BackgroundColor.","inputSchema":{"additionalProperties":false,"properties":{"case_sensitive":{"default":false,"type":"boolean"},"color_map":{"additionalProperties":{"type":"string"},"description":"Ordered map of expected values to color strings. First match in declaration order wins.","minProperties":1,"type":"object"},"default_color":{"default":"Transparent","type":"string"},"path":{"type":"string"},"tablix_name":{"type":"string"},"value_expression":{"description":"Field reference to switch on, e.g. 'Fields!Status.Value'. Leading '=' optional.","type":"string"}},"required":["path","tablix_name","value_expression","color_map"],"type":"object"},"name":"set_conditional_row_color"},{"description":"Set <Visibility> on any named ReportItem (Tablix, Textbox, Image, Rectangle, Subreport, Chart). For group-level visibility use set_group_visibility; for detail-row use set_detail_row_visibility. toggle_textbox optionally points at a textbox name that toggles expand/collapse.","inputSchema":{"additionalProperties":false,"properties":{"element_name":{"type":"string"},"hidden_expression":{"type":"string"},"path":{"type":"string"},"toggle_textbox":{"type":["string","null"]}},"required":["path","element_name","hidden_expression"],"type":"object"},"name":"set_element_visibility"}]}}}
