Skip to main content
Glama

rename_columns_from_mapping

Rename columns in a table using a mapping table that pairs old names with new ones. Appends the rename step to the M query and ignores missing columns.

Instructions

Rename columns from a CONTROL TABLE: Table.RenameColumns(prev, Table.ToRows(...), MissingField.Ignore). Drives renames from a maintained {oldCol, newCol} mapping query; MissingField.Ignore skips columns that are absent. Appends one step to the table's M query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
newColYesthe mapping column holding the NEW names
oldColYesthe mapping column holding the OLD names
sessionIdYes
mappingTableYesthe mapping query/table name
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, the description carries the burden of behavioral disclosure. It reveals that it uses MissingField.Ignore to skip absent columns, appends a step to the M query, and provides the raw M expression. This gives a clear sense of side effects, though it does not mention permissions or validation behavior.

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, front-loaded with the core purpose, and includes a technical snippet that earns its place. It is concise with zero fluff, making it easy to parse.

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 no output schema, the description sufficiently explains the tool's behavior, including the missing-field handling and the M query step. It lacks details on return values or prerequisites like whether the mapping table must already exist, but for a transformation tool this is adequate.

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?

Schema coverage is 67% and the schema already documents oldCol, newCol, mappingTable, and partitionName. The description adds context that oldCol/newCol are fields in the mappingTable and that MissingField.Ignore is applied, but it does not significantly enhance understanding beyond the schema's 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 a specific verb ('Rename'), the resource ('columns'), and the mechanism ('from a CONTROL TABLE'), with an explicit M function signature. It distinguishes itself from sibling tools like 'rename_columns' by emphasizing the mapping-table-driven approach, making its 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 Guidelines3/5

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

The description implies usage when a mapping table exists, but it does not explicitly state when to choose this over alternatives like 'rename_columns' or 'apply_rename_plan'. It lacks when-not-to-use cases or exclusions, so guidance is only implicit.

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