Skip to main content
Glama

add_template_relationship

Add a relationship between tables in a closed Power BI template (.pbit) by editing the DataModelSchema JSON directly, with validation and collision checks, no Power BI Desktop.

Instructions

Add a relationship to a closed .pbit template's model, editing the DataModelSchema JSON on disk with no Power BI Desktop. Both endpoints must exist (the tables and columns are validated). A fresh GUID name is generated. Collision-checked: fails if an identical from/to relationship already exists. Written back in place (with a .bak guard).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toTableYesthe 'one' side table
isActiveNowhether the relationship is active (default true)
pbitPathYespath to the closed .pbit template
toColumnYesthe 'one' side column
fromTableYesthe 'many' side table
fromColumnYesthe 'many' side column
crossFilteringBehaviorNocross-filtering: oneDirection (default) or bothDirections (or automatic)
Behavior5/5

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

With no annotations, the description carries the full burden and excels. It discloses that it edits the DataModelSchema JSON in place, validates both endpoints, generates a fresh GUID name, collision-checks against existing identical relationships, and writes back with a .bak guard. This is rich behavioral context far beyond a simple 'add'.

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

Conciseness5/5

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

Four dense sentences, each providing essential behavioral information: the core action, validation, naming, collision handling, and backup. No fluff or redundancy. The most important details are front-loaded.

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

Completeness4/5

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

For a mutation tool with 7 parameters and no output schema or annotations, the description covers validation, GUID generation, collision checking, and backup safety. Minor gaps include no mention of the return value or prerequisites beyond 'closed .pbit', but overall it is highly informative and adequate for an agent to use correctly.

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

Parameters3/5

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

Schema coverage is 100% — every parameter has a description. The tool description adds general context about validation and naming but does not add meaning for specific parameters beyond what the schema already provides. Baseline 3 is appropriate.

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?

The description opens with a specific verb and resource: 'Add a relationship to a closed .pbit template's model'. It further distinguishes this from the sibling add_relationship by explicitly noting 'editing the DataModelSchema JSON on disk with no Power BI Desktop', which is a clear differentiator.

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

Usage Guidelines4/5

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

The description clearly states the context: this operates on a 'closed .pbit template' and requires 'no Power BI Desktop', implying it is the offline alternative to tools like add_relationship. However, it does not explicitly state when NOT to use it or name alternative tools, so it stops short of a 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyphonica/powerbi-pbix-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server