Skip to main content
Glama

ml_anomaly_detection

Identify unusual data points in a column using isolation forest. Optionally inject known anomalies to evaluate detection with precision, recall, and F1.

Instructions

Detect anomalies in a column with a seeded machine-learning isolation forest: flags the most isolated points under a contamination rate. Optionally injects known anomalies on an in-memory copy and reports precision, recall and F1. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNo
columnYes
evaluateNo
file_pathYes
n_injectedNo
sheet_nameYes
max_samplesNo
n_estimatorsNo
contaminationNo
injection_amplitudeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description itself must disclose side effects; it states 'Read-only' and clarifies that known anomalies are injected only 'on an in-memory copy', so the agent can safely infer no persistent write occurs. It also surfaces the seeded nature and evaluation metrics, which are meaningful behavioral details beyond the schema.

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?

The description is two sentences with the primary behavior first, optional evaluation second, and a final 'Read-only' safety marker. Every sentence earns its place and there is no redundant restatement.

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

Completeness3/5

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

The description covers the core algorithm, evaluation option, and safety profile, and an output schema exists, so return values need not be described. However, with 10 parameters and no annotations, several parameters remain semantically opaque and there is no guidance on when to use this ML tool versus the plain anomaly_detection sibling.

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

Parameters2/5

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

Schema description coverage is 0%, yet the description explains only a subset of parameters: 'seeded' covers seed, 'contamination rate' covers contamination, and 'injects known anomalies... reports precision, recall and F1' covers evaluate/n_injected/injection_amplitude. Parameters like max_samples and n_estimators are left unexplained, so the description does not adequately compensate for the missing schema semantics.

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 anomalies in a column', and names the exact algorithm ('seeded machine-learning isolation forest') and criterion ('contamination rate'). It also distinguishes itself from the simpler sibling 'anomaly_detection' by adding seeding and optional evaluation behavior, so an agent can identify this as the ML variant without opening the schema.

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?

The description implies ML isolation-forest usage and an evaluation mode, but it never states when to choose this tool over the sibling 'anomaly_detection' or other alternatives. There is no when-not-to-use guidance or explicit exclusion criteria.

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