Skip to main content
Glama

ml_train_anomaly_detector

Train an anomaly detection model on a chosen ServiceNow table and numeric field to detect unusual patterns; use background jobs for long runs.

Instructions

Trigger training of an anomaly detection model for a specific table/field. [Write]

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": {
      "table": "<table>",
      "field": "<field>"
    },
    "name": "ml_train_anomaly_detector"
  }
}

Input Schema

NameRequiredDescriptionDefault
asyncNoRun as a background job and return a job_id at once. Poll it with get_job. Calls that take longer than about 20 seconds switch to a job on their own.
fieldYesNumeric field to train on
tableYesTarget table for anomaly detection

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv5.0.1
    • addedInput schema / properties / async
      Added value: +{
      +  "description": "Run as a background job and return a job_id at once. Poll it with get_job. Calls that take longer than about 20 seconds switch to a job on their own.",
      +  "type": "boolean"
      +}
  2. First observedv1.0.2

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, idempotentHint=false, so the appended "**[Write]**" tag merely restates structured data. The description adds nothing beyond that: it doesn't say whether an existing model is overwritten, expected training duration, cost/resource implications, or what identifier comes back to use the model later.

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?

One front-loaded sentence with the action and scope stated first, plus a short tag. The "**[Write]**" tag is redundant against readOnlyHint=false, a minor waste but not harmful.

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?

Adequate minimum for a 3-param mutation tool: annotations cover the safety profile and the schema fully documents async behavior. Still missing the training lifecycle context an agent needs (retrain vs. create, model reuse after training, expected duration beyond the 20s async note).

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 coverage is 100%, and the async parameter's own description already explains the job/polling behavior and the ~20 second auto-switch. "For a specific table/field" just restates the two required params, so baseline 3 is right.

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?

Specific verb+resource+scope: "Trigger training of an anomaly detection model for a specific table/field." The resource name (anomaly detection model) distinguishes it from ml_train_change_risk and ml_train_incident_classifier, though the description never explicitly routes to those siblings.

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?

No when-to-use guidance, no prerequisites (data requirements, minimum history), and no mention of the obvious relationship to ml_detect_anomalies (inference) or ml_evaluate_model. The agent must infer placement in the 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