Skip to main content
Glama

replace_values

Replace a specific value with another in a column to fix data entry errors or standardize values. Types are auto-cast.

Instructions

Replace a specific value with another in a column. Types are auto-cast. Fix known data entry errors or standardize values. Use after identifying issues with get_unique_values. Example: replace_values(column="Status", old_value="N/A", new_value="Unknown")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
columnYes
df_nameNo
new_valueYes
old_valueYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

It discloses one key behavior, 'Types are auto-cast,' which helps with type mismatches. However, it doesn't state whether the operation mutates the dataframe, how missing values are handled, or whether the replacement is exact/substring. With no annotations, these crucial behaviors remain undocumented.

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 short sentences plus an example, with no fluff. It front-loads the core action and uses whitespace effectively.

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?

For a simple value-replacement tool, it includes appropriate usage context, a concrete example, and auto-cast behavior. The output schema covers return values, so that absence isn't an issue. It would benefit from mentioning df_name and mutation behavior, but the overall package is solid.

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 example explains column, old_value, and new_value, but df_name is never mentioned. Since schema descriptions are absent, the description should cover all parameters. It covers three of four, leaving potential confusion about targeting a specific dataframe.

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 opens with a specific verb+resource: 'Replace a specific value with another in a column.' The example provides concrete usage, and the sentence 'Fix known data entry errors or standardize values' clarifies intent. This distinguishes it from nearby siblings like apply_mapping by focusing on single value replacement.

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?

Explicitly instructs 'Use after identifying issues with get_unique_values,' giving a clear precondition. It doesn't mention alternatives or when not to use it, but for a simple tool the guidance is sufficient.

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