Skip to main content
Glama
whoamiTM

bi-mcp

by whoamiTM

bi_explain_alert_chain

Read-only

Decode a Blue Iris alert's action chain and verify what actually happened: retrace filters, verdicts, and the ±2-minute log of MQTT, email, SMS, FTP actions to determine FIRED or SUPPRESSED causes.

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

TableJSON 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'). 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. First observedv0.3.3

TDQS

A4.6/5.0
Behavior4/5

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

The readOnlyHint annotation already signals a safe read operation, so the bar for extra disclosure is lower. The description adds meaningful behavioral context beyond that: it returns raw facts for simple matches and leaves verdicts to the caller, it cross-references a ±2-minute log window, and it is Admin-gated via the log cmd. It does not contradict the readOnlyHint, and the only minor gap is the absence of explicit failure behavior, but the added context is strong.

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?

The description is a single dense paragraph but front-loads the key usage ('Use after bi_list_alerts') and continues with concrete details in order of importance. It earns its length by explaining complex return semantics and an important cost wrinkle. It is longer than minimal, but for a tool with this analytical complexity, the length is justified; a small structural improvement would be bullet points, so not a perfect 5.

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 lacking an output schema, the description covers what the tool returns, how to use it, the interpretation policy for simple matches, the time window of the log cross-reference, and the cost/privilege caveat. For a tool this complex, the description is unusually complete: an agent could decide to call it without needing to open the schema, and would know what to do with the response.

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?

Schema description coverage is 100%, so the schema already documents all four parameters. The description adds value by clarifying that 'path' comes specifically from bi_list_alerts and noting the cost trade-off for max_alert_age_h. It connects parameters to real usage, going slightly beyond bare schema entries, though it could have precisely linked 'camera' and 'path' examples to the decoded output.

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 identifies the tool as an alert-chain explainer that decodes what actions fired on a specific alert, with a specific verb ('explain'), a specific resource (alert action chain), and a concrete workflow context ('Use after bi_list_alerts'). It distinguishes itself from siblings by emphasizing decoded filters, comparator verdicts, and log cross-referencing, which none of the sibling names or descriptions suggest.

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 when to use it: after bi_list_alerts, and exactly what to pass: the alert's path from that response. It also gives a clear exclusion for simple filter matches (caller decides FIRED vs SUPPRESSED) and a warning about admin-gating and log cost for older alerts. This is actionable guidance with no ambiguity.

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