Skip to main content
Glama

replace_value

Replace whole-cell values in Power Query columns, supporting null, text, number, and logical changes.

Instructions

Power Query Replace Value (whole-cell): swap the entire cell value in a column - unlike replace_values which replaces a text substring. Appends Table.ReplaceValue (Replacer.ReplaceValue) to the table's M query, supporting null<->value and numeric replacements (e.g. null->0, 0->null, -1->0). valueType (text | number | logical | null) applies to BOTH oldValue and newValue.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
columnYesthe column to replace in
newValueNothe replacement whole-cell value (omit/empty for null)
oldValueNothe whole-cell value to find (omit/empty for null)
sessionIdYes
valueTypeNotext | number | logical | null (default text)text
partitionNameNopartition name (optional; defaults to the first partition)
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool appends Table.ReplaceValue to the table's M query, indicating a mutating step, and explains the support for null and numeric replacements. While it doesn't mention every side effect, it exceeds the minimum by describing a key behavioral trait.

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 two sentences with no fluff. The first sentence establishes purpose and differentiation, the second provides behavioral and parameter semantics. Every sentence earns its place and is front-loaded with the most important information.

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

Completeness5/5

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

For a tool with 7 parameters and no output schema, the description is complete enough. It explains what the tool does, when to use it, and clarifies the crucial valueType semantics. The schema covers the remaining parameter details, so the description fills the gaps needed for correct selection and invocation.

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?

The schema description coverage is 71%, so a baseline of 3 is appropriate. The description adds value by clarifying that valueType applies to BOTH oldValue and newValue, and by giving concrete examples of numeric replacements. 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 the tool performs a whole-cell replacement in a column, using the specific verb 'swap' and identifying the resource ('column'). It explicitly distinguishes itself from the sibling tool 'replace_values' which replaces text substrings, making the purpose unambiguous.

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

Usage Guidelines5/5

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

The description explicitly contrasts with 'replace_values' (substring vs whole-cell) and provides examples of appropriate use cases (null->0, 0->null, -1->0). This gives clear guidance on when to use this tool over the key alternative.

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