Skip to main content
Glama

三域医研 · 科研算法引擎 (SanYu Research Engine)

Outlier detection / 离群观测检测(Z / 改良Z / IQR)

preprocess_outliers
Read-only

Outlier detection / 离群观测检测(Z / 改良Z / IQR) | USE WHEN: the user suspects a measurement column contains outliers and wants them flagged objectively (Z / modified Z / IQR) | ALIASES: 离群值, 异常值, 离群点, outlier, Z-score, modified Z, IQR, boxplot rule, extreme value | RETURNS: 逐点 points(原始值+统计量+是否离群)、outliers、n_outliers、均值/SD/中位数/MAD/四分位、方法学说明;Z 法给 0 个时会附「小样本不敏感,建议改 iqr」的提示

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": {
      "values": "<values>"
    },
    "name": "preprocess_outliers"
  }
}

Input Schema

NameRequiredDescriptionDefault
methodNozscore(|Z|>3,小样本不敏感)/ modified_z(|MZ|>3.5,推荐)/ iqr(1.5×IQR)
valuesYes一维数值数组,**至少 3 个观测**(少于 3 个无法评估离群,直接 400)。返回离群点索引与判定依据,不自动删除数据。

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / values / description
      Previous value: -"数值数组,至少 3 个观测"New value: +"一维数值数组,**至少 3 个观测**(少于 3 个无法评估离群,直接 400)。返回离群点索引与判定依据,不自动删除数据。"
  2. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds genuinely useful behavior: per-point output shape, method notes, and a self-diagnostic hint that a Z-based result of zero outliers signals small-sample insensitivity and suggests switching to iqr. It stops short of describing edge cases such as ties or missing values.

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?

Content is front-loaded in a pipe-delimited format with the purpose first, then USE WHEN, aliases, and returns, so an agent can scan it quickly. The title is duplicated at the head of the description and some bilingual repetition is redundant, but overall it is tight and well organized.

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?

With no output schema, the description carries the burden of explaining returns, and it does so thoroughly (points, outliers, n_outliers, summary statistics, methodology notes). Combined with the annotations, an agent has enough to call it correctly. Minor absent details like handling of ties or empty/non-numeric arrays keep it from a 5.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the schema itself documents the method enum values with thresholds (|Z|>3, |MZ|>3.5, 1.5×IQR) and the minimum-3-observation constraint with a 400 response. The description adds no parameter meaning beyond that, so the baseline of 3 applies.

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 definition names a concrete verb and resource (detect/flag outliers in a measurement column) and enumerates the three supported methods (Z / modified Z / IQR). It also states the key scope fact that outliers are flagged, not removed, which separates it from destructive cleaning tools. It does not explicitly name a sibling such as act_outlier_robust, so it falls short of full sibling differentiation.

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

Usage Guidelines4/5

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

The 'USE WHEN' clause gives a clear trigger: the user suspects a measurement column has outliers and wants objective flagging. The alias list (离群值, 异常值, boxplot rule, extreme value) helps routing from varied phrasings. There is no explicit when-not guidance or named alternative, so the agent must infer that act_outlier_robust or preprocess_impute may also apply.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.