Skip to main content
Glama
industrial-aiops

OT-AIops Energy

learn_cause_weights

Read-only

Derive per-site cause weights from confirmed incident history, adapting downtime root cause analysis to your site's evidence with explainable, anti-overfit precision.

Instructions

[READ][risk=low] Learn a per-site RCA {cause: weight} profile from history.

Derives a per-site cause-weight profile from a corpus of CONFIRMED past
incidents so downtime_root_cause adapts to what THIS site's evidence actually
predicts. Pure + explainable: each weight is the smoothed signal→cause
precision relative to chance (>1 = evidence for that cause is reliable here,
<1 = often misleading) — no black box. Anti-overfit: Laplace smoothing + a
per-cause min-sample guard, and a fall-back to the shipped defaults when the
corpus is too thin. Feed the returned 'cause_weights' to downtime_root_cause's
cause_weights argument. Advisory: it tunes ranking, never executes anything.

Args:
    history: Confirmed incidents — [{cause, signals:[...]}] where 'cause' is the
        known root cause and 'signals' are the cause labels the evidence pointed
        at (both from the copilot taxonomy: mechanical_fault, comms_loss,
        sensor_fault, material_starvation, quality_reject, changeover, utility_fault).
    min_samples: Minimum confirmed incidents before adapting at all (default 8);
        below it the defaults are kept.
    smoothing: Laplace pseudo-count pulling each estimate toward chance (default 1.0).

Returns dict: {cause_weights:{cause: multiplier}, n_incidents, per_cause:{cause:
    {support, hits, precision, weight, note}}, rationale}.

Example: learn_cause_weights(history=[{"cause":"mechanical_fault",
    "signals":["mechanical_fault"]}, {"cause":"comms_loss","signals":["comms_loss"]}]).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
historyYes
smoothingNo
min_samplesNo
Behavior5/5

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

Beyond the readOnly and non-destructive annotations, the description discloses important behavioral traits: it is 'pure + explainable', uses Laplace smoothing and a per-cause min-sample guard to prevent overfitting, falls back to defaults for thin corpora, and only tunes ranking without executing anything. This adds significant context not available from annotations alone.

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: a concise opening summary, detailed behavioral explanation, parameter descriptions, return format, and a concrete example. Every sentence adds value, with no filler or redundancy, despite the length needed 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?

For a tool with 3 parameters, no output schema, and no nested objects, the description is remarkably complete. It explains the input format, the output dictionary with all fields, the algorithm's safeguards, and provides an example. There are no significant gaps in understanding how to invoke and interpret the tool.

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?

Even though the schema provides no parameter descriptions, the tool description thoroughly explains each parameter: history (with taxonomy enum values), min_samples (with default and behavioral consequence), and smoothing (with interpretation as a pseudo-count). This fully compensates for the 0% schema description coverage.

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: 'Learn a per-site RCA {cause: weight} profile from history.' It specifies the resource (per-site cause-weight profile) and verb (learn), and distinguishes it from related tools by explaining how it feeds into downtime_root_cause.

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 explains when to use the tool: to adapt downtime_root_cause to this site's evidence, based on confirmed past incidents. It also states it is advisory and never executes anything. However, it does not explicitly mention when not to use it or list alternatives.

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