Skip to main content
Glama

rename_columns

Change column names in dataframes using dictionary mapping to improve data clarity and consistency for analysis.

Instructions

Rename columns in the dataframe.

Returns: Dict with rename details

Examples: # Using dictionary mapping rename_columns(ctx, {"old_col1": "new_col1", "old_col2": "new_col2"})

# Rename multiple columns
rename_columns(ctx, {
    "FirstName": "first_name",
    "LastName": "last_name",
    "EmailAddress": "email"
})

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mappingYesDictionary mapping old column names to new names

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
columnsYesList of final column names
renamedYesMapping of old names to new names
successNoWhether operation completed successfully
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the action ('Rename columns') and mentions a return type ('Dict with rename details'), but lacks critical behavioral details such as whether this modifies the dataframe in-place, if it requires specific permissions, error handling for non-existent columns, or side effects. This is a significant gap for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, starting with the core purpose. The examples are helpful but could be more integrated; the structure is efficient with no wasted sentences, though it could be slightly more cohesive.

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 the tool has an output schema (implied by 'Has output schema: true'), the description doesn't need to detail return values. However, as a mutation tool with no annotations and incomplete behavioral disclosure, it falls short. The description covers the basic action and parameters but misses key context like in-place modification or error handling, making it minimally adequate but with clear gaps.

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 100%, with the parameter 'mapping' clearly documented as a dictionary mapping old to new column names. The description adds minimal value beyond this, as it restates the mapping concept in the examples without providing additional semantics like format constraints or edge cases. Baseline 3 is appropriate given the high schema coverage.

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 clearly states the verb ('Rename') and resource ('columns in the dataframe'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'update_column' or 'transform_column_case', which might also involve column modifications, so it doesn't reach the highest score.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't mention if this is for bulk renaming versus single-column updates, or how it differs from tools like 'update_column' or 'transform_column_case' in the sibling list. The examples show usage but don't offer contextual advice.

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/jonpspri/databeak'

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