Skip to main content
Glama

detect_outliers

Detect outliers in a numeric column using IQR or z-score methods, returning counts, percentages, and boundary values. Use before clipping to determine if outliers are errors or genuine.

Instructions

Detect outliers in a numeric column. Methods: 'iqr' (threshold=IQR multiplier) or 'zscore' (threshold=z-score cutoff). Returns count, %, and boundary values. Run BEFORE clip_outliers to quantify outliers and determine if they are errors or genuine. Do not automatically clip without this check. Example: detect_outliers(column="Revenue", method="iqr", threshold=1.5)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
columnYes
methodNoiqr
df_nameNo
thresholdNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries the burden. It discloses method behaviors ('iqr' vs 'zscore' with threshold meanings) and the return payload (count, %, boundary values), which is useful and non-contradictory. It does not explicitly state that the DataFrame is not modified, but the 'Detect' framing and output description make the read-only nature reasonably clear.

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?

Four sentences front-load the action, then methods, return values, and workflow. Every sentence adds value and the example is compact.

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 4 params and no schema descriptions or annotations, the description covers the core semantics and even specifies the output. The only gap is `df_name`, but the workflow guidance and example keep it usable; an output schema also exists, reducing the need to fully spell out returns.

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 has no property descriptions (0% coverage), and the description compensates by explaining `method` options, `threshold` meaning, and giving an example that maps to `column`/`method`/`threshold`. The `df_name` parameter is not explicitly described, though the default and example imply it is optional/current 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 action ('Detect outliers') and identifies the target resource ('numeric column'), then differentiates itself from the sibling `clip_outliers` by explicitly positioning this as the pre-clipping detection step. It clearly names the two methods and what they threshold, so an agent knows exactly what tool this is.

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?

Explicit guidance says 'Run BEFORE clip_outliers to quantify outliers and determine if they are errors or genuine' and 'Do not automatically clip without this check.' This gives both when-to-use and an exclusion/alternative behavior. It also gives a concrete example to anchor invocation.

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