Skip to main content
Glama
whoamiTM

bi-mcp

by whoamiTM

bi_get_alert_image

Read-only

Retrieve a camera's stored alert frame for a specific time (or latest alert) as base64, including alert record and memo to confirm which alert matched.

Instructions

Fetch the STORED alert image (the frame BI saved when an alert fired) for a camera, resolved by time — not a live frame (that's bi_get_camera_snapshot). Pass 'camera' (short name) and optional 'at' (the alert time: ISO-8601, unix epoch int, or relative like '-2h'); omit 'at' for the most recent alert. Returns the most-recent alert at-or-before 'at' as base64, plus its record/time/memo so you can confirm which alert came back. Optional 'markup' (bool) requests the AI-overlay variant (manual's v=2). Internally resolves via alertlist + the /alerts/@record endpoint. Use a specific camera, not 'Index'. MARKUP — when 'markup'=true draws no box, it's almost always the ALERT'S SOURCE, not a tool bug: a box exists ONLY if CodeProject.AI classified the alert (memo has a score, e.g. person:89%). A bare person memo (no %) is an ONVIF/camera-IVS alert that BI's AI never scored, so there is no box to burn — v=2 just re-encodes the frame. (Separately, low-res thumbnails come from the camera's Hi-res-JPEG alert setting being off; that's a distinct issue from markup.) The /alerts/ endpoint only serves what BI stored and ignores w/h/scale params. State the source-vs-bug distinction proactively.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
atNoAlert time. ISO-8601, unix epoch int, or relative shorthand ('-2h', '-1d'). Resolves to the most-recent alert at-or-before this time. Omit for the latest alert.
rawNoIf true, return the raw Blue Iris JSON instead of the shaped view.
cameraYesCamera short name (e.g. 'SecCam_4'). Required.
markupNoIf true, request the AI-markup overlay variant (v=2). Markup only appears when BI stored a detection box.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.3

TDQS

A5/5.0
Behavior5/5

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

The readOnlyHint annotation merely indicates a safe read; the description adds substantial behavioral detail: it returns the most-recent alert at-or-before 'at', returns base64 plus record/time/memo, resolves internally via alertlist and /alerts/@record, and ignores w/h/scale params. It also explains the markup source-vs-bug distinction and the low-resolution thumbnail issue, so the agent can anticipate real-world failure modes.

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 long but every sentence earns its place: core behavior is front-loaded, followed by the time-resolution rule, the live-frame exclusion, the markup caveat, and the distinct low-resolution issue. The structure moves from primary use to edge cases without redundancy, which is appropriate for a tool with nuanced behavior.

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?

The tool has no output schema and complex semantics, yet the description covers what is returned, how time resolution works, how markup behaves, what endpoint it uses, and likely misdiagnoses. Even the raw parameter, while not explained in description, is sufficiently documented in the schema, so nothing an agent needs to call this correctly is missing.

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 with 100% schema coverage, the description adds meaning beyond the schema: it explains that 'at' resolves to the most-recent alert at-or-before that time, that omitting it fetches the latest alert, that 'markup' only produces a box when BI stored a detection score, and that 'camera' must be a specific camera, not 'Index'. These are semantics the schema alone does not convey.

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 states a specific verb and resource: 'Fetch the STORED alert image' for a camera, resolved by time. It also explicitly differentiates from bi_get_camera_snapshot, telling the agent this is not a live frame but the frame BI saved when an alert fired.

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 gives clear invocation guidance: pass 'camera' with optional 'at', omit 'at' for the most recent alert, and use a specific camera rather than 'Index'. It names the alternative tool for live snapshots and explains when to use that instead, plus how markup behavior should be interpreted.

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