Skip to main content
Glama

rename_columns

Rename columns using an old-to-new mapping to standardize names early in data pipelines, preventing reference errors and ensuring consistent snake_case labels.

Instructions

Rename columns using an old->new mapping. Standardize column names early in the pipeline (snake_case, no spaces, explicit names). Prevents reference errors throughout the pipeline. Example: rename_columns(mapping={"old_name": "new_name"})

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
df_nameNo
mappingYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description carries full responsibility. It does not disclose whether the operation mutates the original dataframe or returns a new one, nor how invalid mapping keys are handled. For a transformation tool, this is a significant behavioral gap.

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 three sentences: purpose, usage guidance, and a code example. It is front-loaded, has no fluff, and every sentence adds value.

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 simple tool, the description covers purpose and provides an example, making it minimally viable. However, missing mutation semantics and df_name behavior leave notable gaps. The presence of an output schema reduces the need to describe return values, but behavioral details are still absent.

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 description coverage is 0%, so the description must explain parameters. The core 'mapping' parameter is clearly described via the old->new definition and an example. However, the optional 'df_name' parameter is completely unexplained, leaving ambiguity about the target dataframe.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Rename columns using an old->new mapping' with a specific verb and resource, clearly identifying the operation on column names. It is distinct from sibling data-transformation tools, but it does not explicitly name alternatives, so it misses the top score.

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 advises to 'Standardize column names early in the pipeline' and explains the benefit of preventing reference errors, providing clear context for when to use the tool. It does not mention exclusions or alternative tools, but the usage guidance is actionable.

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/AstyanM/mcp-data-science'

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