Skip to main content
Glama

add_relationship

Create relationships between columns in Power BI semantic models, with configurable cardinality and cross/security filtering behaviors to control data joins.

Instructions

Create a relationship between two columns. Defaults to a star-schema Many->One (from = many/fact side, to = one/dimension side), but the cardinality is overridable to support 1:1, M:1, 1:M and M:M. fromCardinality/toCardinality = One | Many. crossFilteringBehavior = OneDirection | BothDirections | Automatic (overrides the bothDirections flag). securityFilteringBehavior = OneDirection | BothDirections | None. joinOnDateBehavior = DateAndTime | DatePartOnly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activeNomake the relationship active (default true)
toTableYesto (one/dimension) side table
toColumnYesto-side column
fromTableYesfrom (many/fact) side table
sessionIdYes
fromColumnYesfrom-side column
toCardinalityNoto-side cardinality: One | Many (default One)
bothDirectionsNobi-directional cross filter shortcut (default false = single direction). crossFilteringBehavior overrides this.
fromCardinalityNofrom-side cardinality: One | Many (default Many)
joinOnDateBehaviorNoDateAndTime | DatePartOnly (for date-based joins)
crossFilteringBehaviorNoOneDirection | BothDirections | Automatic (overrides bothDirections)
securityFilteringBehaviorNoOneDirection | BothDirections | None
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses useful behavioral details like default cardinality, the meaning of from/to sides, and flag precedence (crossFilteringBehavior overrides bothDirections). However, it does not mention side effects, prerequisites, validation, or failure behavior, which are significant for a mutation tool.

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?

The description is dense but efficient, covering all key behaviors in three sentences. It front-loads the core purpose and then logically details the overridable options. No fluff, though the lack of bullet points makes it a bit of a text wall.

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?

Given the complexity (12 params, no output schema, no annotations), the description covers the configuration options well but lacks operational context. It does not mention return values, error handling, or whether it validates table/column existence. This is a notable gap for a model-mutating tool.

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 coverage is 92%, so the baseline is 3. The description adds value by explaining the semantic mapping of from=many/fact and to=one/dimension, and clarifies the enum values for crossFiltering, securityFiltering, and joinOnDate. This goes beyond the schema's individual parameter descriptions.

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 clearly states 'Create a relationship between two columns' with a specific verb and resource. It also clarifies the from/to sides as many/fact and one/dimension, distinguishing it from sibling tools like update_relationship and delete_relationship.

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 provides clear context on the default star-schema M:1 and explains when to override cardinality and behavior flags. However, it does not explicitly state when to use this tool over alternatives like infer_relationships or update_relationship, so it lacks explicit exclusions.

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