Skip to main content
Glama
ducnguyen221

powerbi-agent

by ducnguyen221

add_relationship_local

Create a Many-to-One relationship between two tables in an open Power BI Desktop model, linking fact and dimension tables. Set active status as needed.

Instructions

Tạo mối quan hệ Many-to-One giữa hai bảng trong mô hình Power BI Desktop đang mở (TOM). Với thao tác modeling hàng loạt/phức tạp, ưu tiên MCP powerbi-modeling (Microsoft) nếu có.

  • from_table/from_column: phía NHIỀU (Many) — thường là bảng Fact.

  • to_table/to_column: phía MỘT (One) — thường là bảng Dim.

  • is_active: True = quan hệ active (mặc định).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portYes
model_idYes
to_tableYes
is_activeNo
to_columnYes
from_tableYes
from_columnYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.1

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the full behavioral burden. It discloses mutation context (TOM/open model), cardinality direction, and the active default, but omits error/duplicate handling, permissions, and side effects of adding a relationship.

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?

The description is compact and front-loaded, with the core action first and parameter semantics in scannable bullets. Every line contributes; no filler.

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?

For a mutation tool with no annotations and 0% schema coverage, the definition provides the essential relationship semantics and an alternative for bulk operations. Still, required environment parameters (port, model_id) and error/precondition behavior are missing, so an agent lacks some invocation details; output schema covers return values.

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?

With 0% schema description coverage, the description must define all parameters, but it only explains from_table/from_column, to_table/to_column, and is_active; required port and model_id are left undocumented. It adds useful cardinality semantics for the core relationship fields but does not fully compensate for the schema gap.

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 states a specific action (create a Many-to-One relationship) and resource (two tables in the open Power BI Desktop TOM model). It also scopes locality via 'local' and TOM, making it distinguishable from service/other modeling tools in the sibling list.

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?

It explicitly routes bulk/complex modeling to the Microsoft powerbi-modeling MCP if available, implying this tool is for simpler local relationship creation. However, it does not spell out when this is preferred over other local siblings or any prerequisites beyond an open model.

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