Skip to main content
Glama

rename_shared_expression

Rename a shared Power Query expression and update all references across the model. Detects conflicting local names to prevent unsafe text rewrites.

Instructions

Rename a shared Power Query expression (parameter / staging query) AND rewrite every #"name" and bare-identifier reference to it across the other shared expressions and table partitions (string literals and comments are never touched). Refuses with the offending document list when another M document declares the same name locally (a let-step or lambda parameter shadows the shared name there, so a text rewrite would be unsafe). Refresh before saving the .pbix.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYescurrent shared expression name
newNameYesnew name
sessionIdYes
Behavior5/5

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

No annotations are present, so the description carries the full burden. It thoroughly discloses side effects: rewriting every reference, never touching string literals/comments, refusal with an offending document list when shadowing occurs, and the need to refresh before saving. These are beyond simple rename semantics and provide strong transparency.

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 information-dense and front-loaded with the primary action. Each sentence earns its place: the first explains what it does, the second covers a safety refusal, and the third gives a required action. It is appropriately sized for the tool's complexity without verbose fluff.

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?

Given the tool's complexity and lack of annotations/output schema, the description covers key behaviors, edge cases, and a prerequisite action. However, it does not describe the success return value or any other outputs, which would be helpful since no output schema exists. Overall, it is nearly complete but missing a small piece of expected information.

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?

The schema already describes 'name' and 'newName' with basic descriptions, so the description adds limited value for those. However, 'sessionId' remains undocumented in both schema and description, and the description does not explain parameter constraints or formats. The context about shared expressions helps but does not fully compensate for the missing sessionId semantics.

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 renames a shared Power Query expression and rewrites all references, with specific details about what types of references are modified. It distinguishes itself from sibling tools like set_shared_expression and delete_shared_expression by describing its unique behavior of updating references across documents.

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 implies when to use this tool: when you need to rename a shared expression and automatically update all references. It also mentions a condition where it refuses (when a local shadowing name exists), which serves as a when-not. However, it does not explicitly name alternative tools or contrast them.

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