Skip to main content
Glama

pbi_relocate_data_source

Bulk-rewrite hardcoded file paths in Power BI M partitions to relocate data sources and fix DataSource.NotFound errors after a workbook moves. Preview changes with dry run before applying.

Instructions

Bulk-rewrite a hardcoded file or folder path inside every M partition.

Use when a workbook moves and queries break with DataSource.NotFound. Looks for old_path as a substring of each M-source partition expression and replaces it with new_path. Calculated/query-source partitions are skipped. dry_run=True returns the planned changes without writing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNo
new_pathYes
old_pathYes
refresh_afterNo
case_sensitiveNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description carries full burden. It discloses the core behavior (substring replacement), skipped partitions, and dry_run effect. However, it does not mention behavior for case_sensitive or refresh_after parameters, nor any potential side effects or permissions.

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 sentences, front-loaded with core action. Every sentence adds value: purpose, usage trigger, matching logic, and dry_run option. No redundant or vague words.

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 5 parameters and an output schema, the description covers the primary use case but omits two boolean parameters. It does not mention the output format, but output schema exists. It lacks context on prerequisites or side effects.

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

Parameters2/5

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

Schema description coverage is 0%, so description must compensate. It explains old_path, new_path, and dry_run, but ignores refresh_after and case_sensitive entirely. Only 3 of 5 parameters are addressed, leaving significant gaps.

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 the tool bulk-rewrites a hardcoded file or folder path inside every M partition, using strong verb 'bulk-rewrite' and specific resource. It distinguishes from sibling tools by focusing on substring replacement in M partitions, a niche not covered by other pbi_* tools.

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?

Explicitly states 'Use when a workbook moves and queries break with DataSource.NotFound', providing a clear trigger. It also notes that calculated/query-source partitions are skipped, but does not mention alternatives or when not to use.

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/imnotStealthy/powerbi-mcp-local'

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