Skip to main content
Glama
industrial-aiops

OT-AIops Energy

baseline_check

Read-only

Compares recent samples against a learned baseline to detect sustained violations beyond p1/p99 by 3×MAD, citing the baseline window and offending samples. Returns ok, violation, or no_baseline.

Instructions

[READ][risk=low] Check recent local samples against the learned baseline.

Reads the last window_s seconds from ~/.iaiops/data.db (no device I/O) and
judges them against the stored band. Conservative by design: a violation is
reported ONLY when values are beyond p1/p99 by more than 3×MAD AND sustained
for >=3 consecutive samples — a single spike is never flagged. Every
violation cites the baseline window (from/to ts, n samples), the band
values, and the offending samples' timestamps/values. No stored baseline →
an explicit no_baseline answer (never a guess). Bounded output (<=10
violations, <=20 cited samples each).

Args:
    tag: Tag name to check, e.g. 'line1.temp'.
    endpoint: Only samples from this endpoint label.
    window_s: Recent window to check, seconds (60..604800; default 3600).

Returns dict: {status: 'ok'|'violation'|'no_baseline', tag, checked_samples,
    thresholds, baseline_citation, violations:[{direction, from_ts, to_ts,
    consecutive_samples, samples:[{ts,value}], baseline}], note}.

Example: baseline_check(tag="line1.temp", window_s=7200).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagYes
endpointNo
window_sNo
Behavior5/5

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

Beyond the annotations (readOnlyHint true, destructiveHint false), the description discloses critical behavior: it reads from a local database with no device I/O, reports violations only under specific conservative conditions (3×MAD and sustained for 3+ samples), handles missing baselines with an explicit 'no_baseline' response, and bounds output size. This is exemplary transparency.

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 well-structured and front-loaded with the core purpose, followed by behavioral details, parameter definitions, return format, and an example. Every sentence adds value, and the length is appropriate for the tool's complexity.

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?

Despite no output schema, the description explicitly lists the return dict structure and fields. It covers parameters, behavior, edge cases, and output bounds, making it fully self-contained for an AI agent to select and invoke the tool correctly.

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

Parameters5/5

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

With 0% schema description coverage, the description fully compensates by explaining each parameter: tag (with example), endpoint (label filter), and window_s (range and default). It also provides a concrete usage example, making the parameters unambiguous.

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 clearly states the tool's function: 'Check recent local samples against the learned baseline.' It uses a specific verb ('check') and resource ('samples against baseline'), and differentiates itself from sibling tools like baseline_learn and baseline_status by focusing on anomaly detection against a stored baseline.

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 description provides clear context on when to use the tool (checking recent samples for baseline violations) and explains its conservative detection policy. It does not explicitly name alternative tools or exclusions, but the context strongly implies this is the go-to for anomaly checking, especially with siblings like baseline_status for status inquiries.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/industrial-aiops/industrial-aiops-energy'

If you have feedback or need assistance with the MCP directory API, please join our Discord server