Skip to main content
Glama

update_column

Modify column values in CSV data using operations like replace, map, apply expressions, or fill missing values.

Instructions

Update values in a column using various operations with discriminated unions.

Returns: ColumnOperationResult with update details

Examples: # Using discriminated union - Replace operation update_column(ctx, "status", { "type": "replace", "pattern": "N/A", "replacement": "Unknown" })

# Using discriminated union - Map operation
update_column(ctx, "code", {
    "type": "map",
    "mapping": {"A": "Alpha", "B": "Beta"}
})

# Using discriminated union - Fill operation
update_column(ctx, "score", {
    "type": "fillna",
    "value": 0
})

# Legacy format still supported
update_column(ctx, "score", {
    "operation": "fillna",
    "value": 0
})

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
columnYesColumn name to update values in
operationYesUpdate operation specification (replace, map, apply, fillna)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successNoWhether operation completed successfully
operationYesType of operation performed
transformNoTransform description
part_indexNoPart index for split operations
nulls_filledNoNumber of null values filled
rows_removedNoNumber of rows removed (for remove_duplicates)
rows_affectedYesNumber of rows affected by operation
values_filledNoNumber of values filled (for fill_missing_values)
updated_sampleNoSample values after operation
original_sampleNoSample values before operation
columns_affectedYesNames of columns affected
Behavior3/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 discloses that the tool returns a 'ColumnOperationResult with update details' and supports both discriminated union and legacy formats, adding useful behavioral context. However, it lacks details on permissions, side effects (e.g., data mutation scope), error handling, or rate limits, which are important 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.

Conciseness3/5

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

The description is front-loaded with a clear purpose statement and return value, but the examples section is lengthy (4 code blocks). While examples are helpful, they dominate the text, making it less concise. Some sentences could be more tightly integrated to reduce bulk without losing clarity.

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 the tool's complexity (mutation with multiple operation types), the description is fairly complete: it states the purpose, return type, and provides examples. With an output schema present, it doesn't need to detail return values. However, it lacks usage guidelines and some behavioral context (e.g., error cases), leaving minor gaps for a mutation tool.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds value by explaining the 'operation' parameter uses 'discriminated unions' and provides concrete examples for 'replace', 'map', and 'fillna' operations, clarifying semantics beyond the schema's technical definitions. It also notes legacy format support, which isn't in the schema.

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's purpose: 'Update values in a column using various operations with discriminated unions.' It specifies the verb ('update'), resource ('values in a column'), and mechanism ('various operations with discriminated unions'), distinguishing it from siblings like 'replace_in_column' (more specific) or 'transform_column_case' (different operation).

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention siblings like 'replace_in_column' or 'fill_column_nulls', which might overlap in functionality, nor does it specify prerequisites, context, or exclusions for usage. The examples illustrate how to call it but not when it's appropriate.

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