视频分析
- 作者仓库星标 1,423
- 许可证 Apache-2.0
- 作者仓库 video-search-and-summarization
Video Analytics (VA-MCP)
Queries incidents, alerts, and metrics stored in Elasticsearch via MCP JSON-RPC at port 9901.
ALWAYS run the commands below yourself and relay results to the user. Do NOT guess or describe — actually execute and report back.
Deployment prerequisite
This skill reads from the Elasticsearch/VA-MCP stack brought up by the VSS alerts profile (either verification or real-time mode). Before any query:
Probe the VA-MCP endpoint:
curl -sf --max-time 5 "http://${HOST_IP}:9901/mcp" >/dev/null 2>&1 || \ curl -sf --max-time 5 "http://${HOST_IP}:9901/" >/dev/nullIf the probe fails, ask the user:
"The VSS
alertsprofile isn't running on$HOST_IP(VA-MCP unreachable). Which mode should I deploy —verification(CV) orreal-time(VLM)?"- Answer → hand off to the
/deployskill with-p alerts -m <mode>. Return here once it succeeds. - If the user declines → stop. No incidents/alerts/metrics to query without the alerts stack up.
(If your caller has granted explicit pre-authorization to deploy autonomously — e.g. the request says "pre-authorized to deploy prerequisites", or you are running in a non-interactive evaluation harness with that permission — skip the confirmation and invoke
/deploydirectly. Default the mode toverificationunless the request specifies otherwise.)- Answer → hand off to the
If the probe passes, proceed.
REQUIRED: Two-Step Pattern (copy this exactly)
Every query requires two shell commands run in sequence:
# Step 1: initialize — get session ID from response HEADER
SESSION_ID=$(curl -si -X POST http://localhost:9901/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"cli","version":"1.0"}},"id":0}' \
| grep -i "mcp-session-id" | awk '{print $2}' | tr -d '\r')
# Step 2: call the tool using the session ID in the header
curl -s -X POST http://localhost:9901/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "mcp-session-id: $SESSION_ID" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"video_analytics__get_incidents","arguments":{"max_count":10}},"id":1}' \
| grep '^data:' | sed 's/^data: //' | jq -r '.result.content[0].text'
The session ID comes from the response header
mcp-session-id, not the body. Skipping Step 1 always results inBad Request: Missing session ID.
Tool Reference
Replace the -d payload in Step 2 with any of the following.
video_analytics__get_incidents
| Parameter | Type | Description |
|---|---|---|
source |
string | Sensor ID or place name (optional) |
source_type |
string | sensor or place |
start_time |
string | ISO 8601: YYYY-MM-DDTHH:MM:SS.sssZ |
end_time |
string | ISO 8601 |
max_count |
int | Max results (default: 10) |
includes |
list | Extra fields: objectIds, info |
vlm_verdict |
string | confirmed, rejected, or unverified |
# Recent incidents (all sensors)
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"video_analytics__get_incidents","arguments":{"max_count":10}},"id":1}'
# For a specific sensor
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"video_analytics__get_incidents","arguments":{"source":"<sensor-id>","source_type":"sensor","max_count":20}},"id":1}'
# Confirmed (VLM-verified) only
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"video_analytics__get_incidents","arguments":{"vlm_verdict":"confirmed","max_count":10}},"id":1}'
video_analytics__get_incident
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"video_analytics__get_incident","arguments":{"id":"<incident-id>","includes":["objectIds","info"]}},"id":1}'
video_analytics__get_sensor_ids
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"video_analytics__get_sensor_ids","arguments":{}},"id":1}'
video_analytics__get_places
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"video_analytics__get_places","arguments":{}},"id":1}'
video_analytics__get_fov_histogram
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"video_analytics__get_fov_histogram","arguments":{"source":"<sensor-id>","source_type":"sensor","start_time":"<ISO>","end_time":"<ISO>","object_type":"Person","bucket_count":10}},"id":1}'
video_analytics__analyze
analysis_type: max_min_incidents, average_speed, avg_num_people, avg_num_vehicles
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"video_analytics__analyze","arguments":{"source":"<sensor-id>","source_type":"sensor","start_time":"<ISO>","end_time":"<ISO>","analysis_type":"avg_num_people"}},"id":1}'
vst_sensor_list
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"vst_sensor_list","arguments":{}},"id":1}'- 流狐分类
- AI 智能
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 94 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @NVIDIA-AI-Blueprints · Apache-2.0
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需简单配置
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- 未声明
- 底层运行要求
- 未声明
- 检测到的文件与系统行为
-
- 只读
- Shell 执行
- 检测到的网络行为
- 允许外网请求
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 This skill reads from the Elasticsearch/VA-MCP stack brought up by the VSS alerts profile (either verification or real-time mode). Before any query: Probe the VA-MCP endpoint: If the probe fails, ask the user:
Every query requires two shell commands run in sequence: The session ID comes from the response header mcp-session-id, not the body. Skipping Step 1 always results in Bad Request: Missing session ID.
Replace the -d payload in Step 2 with any of the following.
Parameter · Type · Description source · string · Sensor ID or place name (optional) sourcetype · string · sensor or place
videoanalyticsgetincident
videoanalyticsgetsensorids
# Video Analytics (VA-MCP)
Queries incidents, alerts, and metrics stored in Elasticsearch via MCP JSON-RPC at **port 9901**.
> **ALWAYS run the commands below yourself and relay results to the user. Do NOT guess or describe — actually execute and report back.**
---
## Deployment prerequisite
This skill reads from the Elasticsearch/VA-MCP stack brought up by the VSS **alerts** profile (either `verification` or `real-time` mode). Before any query:
1. Probe the VA-MCP endpoint:
```bash
curl -sf --max-time 5 "http://${HOST_IP}:9901/mcp" >/dev/null 2>&1 || \
curl -sf --max-time 5 "http://${HOST_IP}:9901/" >/dev/null
```
2. **If the probe fails**, ask the user:
> *"The VSS `alerts` profile isn't running on `$HOST_IP` (VA-MCP unreachable). Which mode should I deploy — `verification` (CV) or `real-time` (VLM)?"*
- Answer → hand off to the `/deploy` skill with `-p alerts -m <mode>`. Return here once it succeeds.
- If the user declines → stop. No incidents/alerts/metrics to query without the alerts stack up.
(If your caller has granted explicit pre-authorization to deploy
autonomously — e.g. the request says "pre-authorized to deploy
prerequisites", or you are running in a non-interactive evaluation
harness with that permission — skip the confirmation and invoke
`/deploy` directly. Default the mode to `verification` unless the
request specifies otherwise.)
3. If the probe passes, proceed.
---
## REQUIRED: Two-Step Pattern (copy this exactly)
**Every query requires two shell commands run in sequence:**
```bash
# Step 1: initialize — get session ID from response HEADER
SESSION_ID=$(curl -si -X POST http://localhost:9901/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Deployment prerequisite → REQUIRED: Two-Step Pattern (copy this exactly) → Tool Reference → videoanalyticsgetincidents → videoanalyticsgetincident → videoanalyticsgetsensorids
要点 -> port 9901 · alerts · If the probe fails · Every query requires two shell commands run in sequence · response header
文件/命令 -> verification · real-time · alerts · $HOSTIP · /deploy · -p alerts -m <mode> · mcp-session-id · Bad Request: Missing session ID
内容 SHA-256 -> c5c75c86d37e
方法与流程
适用与边界
原文中的明确线索
verification、real-time、alerts、$HOSTIP、/deploy、-p alerts -m <mode>、mcp-session-id、Bad Request: Missing session ID