Skip to main content
Glama
industrial-aiops

OT-AIops Energy

baseline_learn

Read-only

Learn a conservative normal band for a tag from historical samples, using robust percentiles. Returns a baseline or an explicit insufficient-data verdict when data is scarce.

Instructions

[READ][risk=low] Learn a conservative per-tag normal band from local history.

Source is ~/.iaiops/data.db — the local store written by
historian_push(sink="sqlite") — NOT a live device read. Learns robust
percentiles (p1/p99 + median/MAD, no ML) from the tag's own samples,
segmented at the latest change recorded via baseline_record_change (the band
reflects only the post-change regime). REFUSES with an explicit
insufficient_data verdict (listing exactly what is missing) below 100 usable
samples or under 24h of span — it never invents a band from thin data. On
success the band is persisted to ~/.iaiops/baselines.json (owner-only local
metadata, not an OT write).

Args:
    tag: Tag name to learn, e.g. 'line1.temp'.
    endpoint: Only samples from this endpoint label.
    since: Only samples at/after this ISO-8601 time.

Returns dict: {status: 'ok'|'insufficient_data', tag, band:{p1,p99,median,mad},
    n_samples, window:{from_ts,to_ts,span_s}, segment, missing?:[...], note}.

Example: baseline_learn(tag="line1.temp", since="2026-06-01T00:00:00").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagYes
sinceNo
endpointNo
Behavior5/5

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

Despite readOnlyHint=true, the description honestly discloses that successful calls persist the band to ~/.iaiops/baselines.json, adding important context about a local write side effect. It also details algorithm behavior (percentiles, no ML), refusal conditions, and the guarantee that it 'never invents a band from thin data', going well beyond the annotations.

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 with clear sections: intro, source, algorithm, refusal, persistence, args, returns, and example. Every sentence adds value, and the length is justified by the tool's complexity. The upfront '[READ][risk=low]' provides an immediate safety signal.

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?

With no output schema, the description fully specifies the return dict fields, including status, band components, n_samples, window, segment, and optional missing list. It covers all necessary invocation context (source, algorithm, refusal, side effects, parameters, example), making it complete for an AI agent to select and call the tool correctly.

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?

The schema has zero descriptions, so the Args section compensates by explaining each parameter: tag with example, endpoint as a label filter, and since as an ISO-8601 time filter. The example call further disambiguates usage, though the descriptions are brief and do not specify all edge-case behaviors (e.g., null for endpoint).

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 opening sentence 'Learn a conservative per-tag normal band from local history' uses a specific verb and resource, precisely stating what the tool does. It further distinguishes itself from live device reads and references related tools like baseline_record_change and historian_push, setting it apart from siblings.

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

Usage Guidelines5/5

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

The description explicitly states the data source is '~/.iaiops/data.db' written by historian_push and stresses 'NOT a live device read', clearly indicating when not to use it. It also gives concrete refusal thresholds (100 samples or 24h span), telling the agent exactly when the tool will reject insufficient data, and mentions the dependency on baseline_record_change for segmentation.

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