iris_outliers
Lists Iris dataset rows whose z-score on a chosen numeric column exceeds a given absolute threshold. Use it to flag outliers and get each row's index, measurements, species and z-score.
Instructions
List the Iris rows whose z-score on one numeric column exceeds z in absolute value (z-score = (value - column mean) / sample std, computed with pandas over all 150 rows). Returns the column, the threshold, how many rows qualified (total) and at most IRIS_MAX_ROWS of them (default 50; truncated is true when some were cut), each row with its 0-based index, the four measurements, species and its z-score rounded to 3 decimals. z must be positive: z 2.5 on sepal_width yields 2 rows, z 0 would list every row and is cut at the limit. Pure and stateless. A post guardrail refuses any result above 50 rows or whose cells are not numbers.
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": {
"column": "<column>",
"z": "<z>"
},
"name": "iris_outliers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| z | Yes | absolute z-score threshold; 2.5 is the usual choice | |
| column | Yes | the numeric column to test |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| z | Yes | ||
| rows | Yes | ||
| limit | Yes | IRIS_MAX_ROWS, default 50 | |
| total | Yes | rows over the threshold before the limit | |
| column | Yes | ||
| truncated | Yes |