Skip to main content
Glama

Add Visual

add_visual

Add a visual to a Power BI report page by defining its type, mapped fields, position, and size, so you can build report layouts and data views in .pbip projects.

Instructions

Add a visual to a page. visual_type: card, slicer, donutChart, pieChart, filledMap, map, barChart / columnChart (stacked; "stackedBarChart" is accepted as an alias), clusteredBarChart, clusteredColumnChart, textbox, table, matrix. fields maps roles to fields, e.g. {"Y": "Tilaukset[Myynnin arvo]", "Category": "Kunnat[Kommun]", "Series": "Tilaukset[Tuoteryhmä]"}. Roles: card/slicer=Values; donut/pie=Category+Y; bar/column charts= Category+Series+Y; filledMap/map=Category(+Y/Size); textbox: options {"text": "..."}. x/y/width/height are pixels on a 1280x720 page. legend: "Top"|"Bottom"|"Left"|"Right". title: show header. options: extra PBIR objects merged into the visual.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pbip_path": "<pbip_path>",
      "page": "<page>",
      "visual_type": "<visual_type>"
    },
    "name": "add_visual"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
nameNo
pageYes
titleNo
widthNo
fieldsNo
heightNo
legendNo
optionsNo
pbip_pathYes
visual_typeYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full behavioral burden. It does add real operational context (coordinates are pixels on a fixed 1280x720 page, options are extra PBIR objects merged into the visual), which is valuable. However, it never says whether the operation persists to disk, what happens on name collision or a missing page, or what errors/permissions apply — significant gaps for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense and front-loaded — the action comes first, then the type enum, then field/role semantics, then geometry and display options. The telegraphic style is efficient with no filler, though the run-on role mapping block could be broken up for easier parsing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be described. But with 12 parameters and 0% schema coverage, an agent is still missing the meaning of pbip_path, page, and name, and gets no statement of preconditions. Adequate for constructing a call, incomplete for understanding side effects.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it largely does: visual_type gets a full enum list plus alias behavior ('stackedBarChart' accepted), fields gets a role-mapping example and per-type role requirements, legend gets its four allowed values, and x/y/width/height get units. Only page, pbip_path, and name are left unexplained, which is the main shortfall.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Add a visual to a page') and then enumerates the exact visual types supported, so an agent can tell this apart from the table-creating siblings (add_csv_table, add_date_table) at a glance. Scope is unambiguous without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The enumerated visual_type list implies when this tool applies versus the data-table siblings, but there is no explicit when-to-use/when-not-to-use statement. No prerequisites are stated either — e.g. whether the target page must already exist or how pbip_path relates to it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.