Skip to main content
Glama

clip_outliers

Caps extreme values in numeric columns with IQR or quantile bounds to fix erroneous outliers identified by detection, while keeping genuine extremes.

Instructions

Clip outlier values in a numeric column. Methods: 'iqr' (Q1 - multiplierIQR, Q3 + multiplierIQR) or 'quantile' (lower/upper quantile). Use AFTER detect_outliers confirms outliers exist. Only clip if outliers are errors; genuine extreme values should be kept. Example: clip_outliers(column="Revenue", method="iqr", iqr_multiplier=1.5)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
columnYes
methodNoiqr
df_nameNo
iqr_multiplierNo
lower_quantileNo
upper_quantileNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden. It explains the IQR and quantile methods with formulas, and the positional guidance. However, it does not disclose whether the operation mutates the dataframe in place or returns a new one, nor how non-numeric or missing values are handled. This is useful context but not exhaustive.

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 four sentences: a definition, method details, usage guidance, and an example. Each sentence earns its place with no redundancy. It front-loads the action and immediately explains the methods.

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?

The description covers purpose, methods, usage, and an example. Since an output schema exists, return values are already specified. It omits edge-case behavior (e.g., non-numeric columns, missing values), but for a typical data-cleaning tool with this guidance, it is reasonably complete.

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 does so by explaining the 'iqr' and 'quantile' methods, the meaning of iqr_multiplier via the formula, and the lower/upper quantile parameters. The example clarifies usage. The df_name parameter is not explained, but its default and common usage across the tool family make it less critical.

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 states a specific verb and resource: 'Clip outlier values in a numeric column.' It clearly distinguishes from sibling tools like detect_outliers (which detects) and filter_rows (which filters), by focusing on the clipping action and the two available methods.

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

Usage Guidelines5/5

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

It explicitly says 'Use AFTER detect_outliers confirms outliers exist' and 'Only clip if outliers are errors; genuine extreme values should be kept.' This gives clear when-to-use and when-not-to-use guidance, naming the prerequisite tool and the design decision around genuine extremes.

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