Skip to main content
Glama

Add Relationship

add_relationship

Creates a relationship between two tables in a Power BI project by linking a MANY-side column to a ONE-side column using DAX-style references such as 'Sales[StoreId]'.

Instructions

Relate two tables in a project. from_column = MANY side, to_column = ONE side, DAX style like 'Sales[StoreId]'.

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>",
      "from_column": "<from_column>",
      "to_column": "<to_column>"
    },
    "name": "add_relationship"
  }
}

Input Schema

NameRequiredDescriptionDefault
pbip_pathYes
to_columnYes
from_columnYes
cross_filterNooneDirection

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/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 usefully discloses the cardinality convention (from = MANY, to = ONE) and the DAX column reference format, but says nothing about mutation effects on disk, duplicate-relationship handling, validation failures, or required permissions for a write operation.

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?

Two short sentences, front-loaded with the purpose, and no filler. The second sentence is dense but every clause carries information; only minor clarity is lost in the abbreviated 'DAX style' phrasing.

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

Completeness2/5

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

For a four-parameter mutation tool with zero annotation and zero schema description coverage, the description leaves too much open: the meaning of pbip_path, the allowed values of cross_filter, and the failure/persistence behavior are all missing. The output schema covers return values, so that gap is excusable, but the input-side gaps are not.

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 0%, so the description must compensate, and it does explain two of four parameters well: from_column/to_column are defined by cardinality and given an example format ('Sales[StoreId]'). However, pbip_path and cross_filter (with its default 'oneDirection' and presumably other modes) are left entirely undocumented.

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

Purpose4/5

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

States a specific verb and resource ('Relate two tables in a project'), which is immediately distinguishable from siblings like add_measure or add_visual. It does not name or contrast any sibling explicitly, but the operation is unambiguous.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisites (e.g. whether both tables must already exist in the project, whether the relationship is persisted to the .pbip file), and no stated alternative such as inspecting existing relationships via pbix_relationships. Only the direction convention is explained.

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