Skip to main content
Glama

fill_missing_values

Handle missing data in CSV files using strategies like imputation, forward/backward fill, or row removal to prepare datasets for analysis.

Instructions

Fill or remove missing values with comprehensive strategy support.

Provides multiple strategies for handling missing data, including statistical imputation methods. Handles different data types appropriately and validates strategy compatibility with column types.

Examples: # Drop rows with any missing values fill_missing_values(ctx, strategy="drop")

# Fill missing values with 0
fill_missing_values(ctx, strategy="fill", value=0)

# Forward fill specific columns
fill_missing_values(ctx, strategy="forward", columns=["price", "quantity"])

# Fill with column mean for numeric columns
fill_missing_values(ctx, strategy="mean", columns=["age", "salary"])

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
strategyNoStrategy for handling missing values (drop, fill, forward, backward, mean, median, mode)drop
valueNoValue to use when strategy is 'fill'
columnsNoColumns to process (None = all columns)

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?

With no annotations provided, the description carries the full burden. It adds some behavioral context by mentioning 'validates strategy compatibility with column types' and implying data mutation (e.g., 'fill' or 'drop'), but doesn't disclose critical details like whether the operation is destructive to original data, error handling, or performance considerations. The examples help but don't fully compensate for the lack of annotations.

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 well-structured with a clear opening statement followed by bullet-point-like examples. It's appropriately sized, but the examples section is lengthy and could be more concise. Every sentence adds value, though some redundancy exists between the description text and examples.

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 moderate complexity (3 parameters, 100% schema coverage, output schema exists), the description is fairly complete. It covers purpose, strategies, and usage examples. With an output schema present, it doesn't need to explain return values. However, it could improve by addressing sibling tool differentiation and more behavioral details, given the lack of annotations.

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?

The schema description coverage is 100%, so the baseline is 3. The description adds value by providing concrete examples that illustrate parameter usage (e.g., 'strategy="drop"' or 'columns=["price", "quantity"]'), which clarifies semantics beyond the schema's enum and descriptions. However, it doesn't explain edge cases or interactions between parameters in depth.

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 tool's purpose: 'Fill or remove missing values with comprehensive strategy support.' It specifies the verb ('fill or remove') and resource ('missing values'), and mentions 'multiple strategies' and 'handles different data types.' However, it doesn't explicitly differentiate from sibling tools like 'fill_column_nulls' or 'check_data_quality,' which might have overlapping functionality.

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 provides implied usage through examples (e.g., 'Drop rows with any missing values'), which suggests when to use certain strategies. However, it lacks explicit guidance on when to choose this tool over alternatives like 'fill_column_nulls' or 'check_data_quality,' and doesn't mention prerequisites or exclusions (e.g., data must be loaded first).

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