Skip to main content
Glama

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

NameRequiredDescriptionDefault
zYesabsolute z-score threshold; 2.5 is the usual choice
columnYesthe numeric column to test

Output Schema

NameRequiredDescriptionDefault
zYes
rowsYes
limitYesIRIS_MAX_ROWS, default 50
totalYesrows over the threshold before the limit
columnYes
truncatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.1

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full behavioral burden and does so: it declares the tool 'pure and stateless', documents the IRIS_MAX_ROWS cap (default 50) and the 'truncated' flag, and discloses a post guardrail that rejects results above 50 rows or with non-numeric cells. The computation basis (pandas sample std over all 150 rows) and 3-decimal rounding are also stated, which the agent could not know otherwise.

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?

Information is front-loaded: purpose first, then return shape, then constraints, then the guardrail. Sentences are dense but each carries a distinct fact (formula, cap, truncation flag, positivity constraint, guardrail). Some of the return-shape detail duplicates the output schema, which is mild waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter stateless query tool with no annotations, everything an agent needs is present: the statistic definition, the positivity constraint, the truncation limit and default, the edge case at z=0, and the guardrail behavior. Return values are described as well, so even the presence of an output schema leaves no gap.

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 coverage is 100%, so the baseline is 3, but the description adds real meaning beyond it: it imposes 'z must be positive' (a constraint absent from the schema, which only says 'absolute z-score threshold'), and it clarifies that the mean/std are computed over all 150 rows rather than a subset. The column enum's meaning is only lightly extended, keeping this below a 5.

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 description opens with a precise verb and resource plus the exact computation: 'List the Iris rows whose z-score on one numeric column exceeds z in absolute value'. It even defines the formula and the data it runs over. It never names a sibling (iris_describe, iris_group_means) to contrast with, so the agent must infer the boundary from the name alone.

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

Usage Guidelines3/5

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

Usage context is implied rather than stated: '2.5 is the usual choice' in the schema and the worked example 'z 2.5 on sepal_width yields 2 rows' tell the agent how to call it, and 'z 0 would list every row' warns about a degenerate input. There is no explicit statement of when to pick this over iris_describe or iris_report, and no exclusions.

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