Skip to main content
Glama

Detect Outliers

detect_outliers

Detect outliers in numerical dataset columns using the IQR method, returning bounds, per-column counts with example values, and skipped constant or flag columns.

Instructions

Detect outliers in numerical columns using the IQR method (values beyond Q1 - 1.5IQR or Q3 + 1.5IQR). Columns where IQR is 0 (constant columns, 0/1 flags, one-hot columns) are skipped and listed. Args: dataset_id (str): ID of the dataset. columns (list[str], optional): Numerical columns to check. Default is all numerical columns. max_values (int): Maximum number of outlier values listed per column (the count is always complete). Default is 50. Returns: dict: outliers_bounds, per-column outlier count with example values, and skipped_columns.

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": "detect_outliers"
  }
}

Input Schema

NameRequiredDescriptionDefault
columnsNo
dataset_idYes
max_valuesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden, and it does disclose meaningful behavior: the exact IQR thresholds, that zero-IQR columns are skipped and reported, and that max_values limits listing while the count stays complete. It never states that the dataset is left unmodified (no write/mutation disclosure), nor anything about permissions or cost on wide datasets, which matters for a tool whose siblings do mutate.

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 with purpose and method, then structured Args/Returns blocks with no filler sentences. The Returns block earns its place because there is no output schema; only the dataset_id line is wasted space.

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?

For a three-parameter, no-annotation, no-output-schema tool, the definition covers method, edge cases (constant/one-hot columns), parameter semantics, and the shape of the return value. The main remaining gap is that non-mutation is implied by 'detect' rather than stated, which is a real risk given sibling tools that cap and remove.

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, and it does: every one of the three parameters is documented with its default and meaning, including the non-obvious nuance that max_values only caps example values while the count remains complete. dataset_id is described only as 'ID of the dataset', which adds nothing beyond the name.

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?

States a specific verb and resource ('Detect outliers in numerical columns') plus the exact method (IQR with Q1-1.5*IQR / Q3+1.5*IQR bounds), which lets an agent distinguish it from the mutating siblings cap_outliers and remove_outliers. It stops short of naming those siblings explicitly, so the differentiation is inferred from the verb rather than stated.

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 explains defaults ('all numerical columns') but gives no when-to-use context, no when-not guidance, and never points to cap_outliers or remove_outliers as the follow-up for acting on what is found. An agent must infer that this is the read-only diagnostic step in an outlier workflow.

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