Skip to main content
Glama

Fill Missing Median

fill_missing_median

Replace missing numerical values with column medians to handle gaps in datasets; optionally target one column or all numerical columns and return fill counts.

Instructions

Replace missing numerical values with the column median. Args: dataset_id (str): ID of the dataset. col_name (str, optional): Only this column is filled. If omitted, all numerical columns are processed. Returns: dict: how many values were filled in each column.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "dataset_id": "<dataset_id>"
    },
    "name": "fill_missing_median"
  }
}

Input Schema

NameRequiredDescriptionDefault
col_nameNo
dataset_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it usefully discloses that only numerical values are affected, the default all-columns scope, and the return shape (fill counts per column). It does not state whether the dataset is mutated in place or copied, nor how edge cases like an all-null column are handled, which matters for a write operation.

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?

Front-loaded summary sentence followed by structured Args/Returns sections; nothing is redundant. The docstring framing is slightly formulaic but every line carries information.

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 two-parameter mutation tool with no annotations and no output schema, the description covers parameters and return values adequately. It stops short of the mutation contract (in-place vs. new dataset, permissions, failure behavior), which is the main remaining gap an agent would care about.

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 0%, so the description must compensate. It documents both parameters, and the col_name entry adds real semantics beyond the schema: it is optional, targets a single column, and defaults to all numerical columns.

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?

States a specific verb and resource ('Replace missing numerical values with the column median'), which inherently distinguishes it from the mean/mode/drop siblings. An agent can identify the operation without opening the schema.

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?

Provides implied usage through the col_name default ('If omitted, all numerical columns are processed'), which tells the agent how scope works. However, it never says when median imputation is preferable to fill_missing_mean, fill_missing_mode, or drop_missing, so alternative selection is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools