Skip to main content
Glama
whoamiTM

bi-mcp

by whoamiTM

bi_explain_alert_chain

Read-only

Decode what actions fired on a Blue Iris alert: returns its facts, decoded action filters, comparator verdicts, and a log cross-reference of what actually ran. Use after listing alerts.

Instructions

Use after bi_list_alerts to decode what actions fired on a specific alert. Pass the alert's path from that response. Explain a specific alert's action chain. Given (camera, alert_path), returns the alert's facts (memo, profile/preset at trigger, zones), each action row with its decoded filters, comparator verdicts for the cases that need them (compound predicates like 'car+licenseplate', confidence thresholds like 'person:80', cross-zone sequencing, wait-row gating), and a ±2-minute log cross-reference of what BI actually did (MQTT publishes, email/SMS/FTP results, AI cancellations). Simple filter matches (object-in-list, profile, source bit) are surfaced as raw facts; the caller decides FIRED vs SUPPRESSED for those. Admin-gated (uses the log cmd).

Input Schema

NameRequiredDescriptionDefault
rawNoIf true, return the raw Blue Iris JSON instead of the shaped view.
pathYesAlert path from bi_list_alerts (e.g. '@4473131744.bvr', or '@12856749679.jpg' for a still-only alert). Required.
cameraYesCamera short name (e.g. 'SecCam_3'). Required.
max_alert_age_hNoRefuse to query the log for alerts older than this many hours. Default 24. BI's log cmd has no upper-time bound, so older alerts trigger a global log slice; raise this only when forensic review is worth the cost.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.4
    • changedInput schema / properties / path / description
      Previous value: -"Alert path from bi_list_alerts (e.g. '@4473131744.bvr'). Required."New value: +"Alert path from bi_list_alerts (e.g. '@4473131744.bvr', or '@12856749679.jpg' for a still-only alert). Required."
  2. First observedv0.3.3

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint annotation: discloses admin gating, that it shells out to the log cmd, and the cost consequence captured in max_alert_age_h ('older alerts trigger a global log slice'). It also defines diagnostic boundaries — compound predicates and confidence thresholds get verdicts, while simple filter matches are returned as raw facts and left to the caller to judge FIRED vs SUPPRESSED.

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?

Front-loads the when-and-how ('Use after bi_list_alerts... Pass the alert's path') before the return-shape exposition, which is the right ordering. The middle sentence is a long run-on dense with parentheticals that slows scanning, but no sentence is genuinely disposable given 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?

With no output schema, the description carries the full burden of describing returns and does so concretely: alert facts (memo, profile/preset, zones), per-action decoded filters, comparator verdicts, and a ±2-minute log cross-reference covering MQTT, email/SMS/FTP, and AI cancellations. Admin gating and cost behavior are also covered, leaving nothing essential for a correct invocation unstated.

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%, so camera, path, raw, and max_alert_age_h are already fully documented, and the description largely restates the path's provenance rather than adding new semantics. The one value-add is tying the log cross-reference window to the tool's behavior, but that is also stated in the schema.

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?

Names a specific verb (explain/decode) and a concrete resource (a specific alert's action chain), and explicitly positions itself downstream of bi_list_alerts so an agent can tell it apart from sibling listing tools. The parenthetical scope '(camera, alert_path)' pins the operation to a single alert rather than a collection.

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?

States the trigger condition clearly ('Use after bi_list_alerts') and how to obtain the required input ('Pass the alert's path from that response'), plus an operational prerequisite ('Admin-gated (uses the log cmd)'). It does not name explicit alternatives such as bi_audit_actions or bi_list_log for cases where a raw action audit is wanted, so it falls short of full when/when-not coverage.

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