OPPO 健康数据接收/查询的标准 MCP 规范接口 — 独立于 Flask 接收端(纯 mcp + sqlite3, 无 flask 依赖), 与手机 APK 通道共用同一 sink 库 (~/oppo-health/sink/health.db), 数据天然一致。
Server has 6 tools with explicit schemas and descriptions, but quality is uneven. Tool names lack action verbs (health_ingest, health_query are acceptable; health_watermark, health_list_tables, health_stats are weak). Descriptions are present but terse (avg ~80 chars, below 194-char baseline). Parameter descriptions exist but lack format/constraint details. No output schemas documented. Error handling is minimal, health_ingest returns {error: ...} but others have no error guidance. Security is well-designed (SQL injection prevention, identifier validation), but this doesn't offset definition gaps. No tool annotations (readOnlyHint, destructiveHint). Composition is reasonable, tools are single-purpose and chainable via table names.
接收健康数据增量分节文本(格式: ===TABLE:<表>|TIMECOL:<列>=== + 列头行 + 数据行, 可多表分节)。幂等入库(行哈希 UNIQUE)并更新水位。返回 {tables, new_rows, dup_skipped, watermark}。
列出 sink 库所有已入库表 + 各自行数。
查询某表已入库数据。table=表名(须已存在); columns=逗号分隔的合法列名(默认* 全部, 可含 __t/__row_hash); since/until=毫秒时间戳过滤 __t(增量同步用); limit=最多行(默认500, 最大5000)。返回 {columns, rows}。
查看某表结构(列名)。table 须已存在。
各表统计概览 {表: {rows, min_t, max_t}}。
查询各表水位(已同步到的最大时间戳, 毫秒)。
Tool names lack action verbs. 'health_watermark', 'health_list_tables', 'health_stats' are nouns/adjectives, not verb_noun patterns. LLMs infer intent from names, 'get_watermark', 'list_tables', 'get_stats' would be clearer.
No output schemas documented. Tools return dicts/lists but LLMs cannot see field types or structure. E.g., health_query returns {columns, rows} but no schema for row structure or column types.
Parameter descriptions lack format/constraint details. 'since' and 'until' are integers but no mention of millisecond range, valid bounds, or epoch reference. 'columns' accepts comma-separated names but no validation guidance.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 59 | 2026-07-28+ | v2 |
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). health_ingest is destructive (writes to DB) but unmarked. health_query is read-only but unmarked. Agents cannot infer safety without annotations.
Error handling is minimal. Only health_ingest returns error messages; others have no error guidance. If health_query receives an invalid table name, the tool likely crashes or returns a generic exception instead of 'Table not found. Available tables: ...'