Skip to main content
Glama
kirisawa-subaru

miband-health-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_band_statusA

Band connection, battery, charging and heart-rate/SpO2/stress monitoring settings.

Monitoring configuration is read-only. Remote reads reconnect automatically within the timeout; cached never contacts the phone. Unknown fields remain null. max_age_seconds: 1..86400; timeout_seconds: 10..90. No app UI interaction.

get_health_statusA

Recent HR, steps, sleep/workout history, wearing, sleep and activity state.

Each device-state observation has its own age/source. Current sleep_state is the band's classification, distinct from latest_sleep (a historical sleep session). cached uses local data only; remote reads reconnect automatically. This does not start a new measurement or change monitoring settings. max_age_seconds: 1..86400; device-state age is capped at 120s. timeout_seconds: 10..90.

get_current_stateA

Recent recorded heart rate, steps and historical sleep/workouts; Gadgetbridge adds battery.

cached returns immediately. prefer_fresh attempts an ordinary backend pull if HR is old; require_fresh returns freshness_unmet if the requested age cannot be met. No app UI interaction. A successful recent pull is reused for 60 seconds even when source data remains stale. wait_seconds: 1..30; max_age_seconds: 1..86400.

get_daily_reportA

Cached natural-day summary (YYYY-MM-DD), with sleep assigned to the waking day.

Includes sample coverage and optional preceding-day comparisons (missing days excluded). For a morning digest, query yesterday's activity and today's waking sleep separately. Call sync_health first if needed. timezone is an IANA name, default Asia/Shanghai.

query_healthA

Bounded cached detail: metric buckets, sleep sessions, or workouts.

Supply both start (inclusive) and end (exclusive) as offset-aware ISO timestamps, or neither for the last 24 hours (timeseries) / 30 days (sessions). limit 1..500; use returned pagination for more. Session IDs from summaries select a session. Missing buckets remain missing. Common metrics: heart_rate.bpm (default), steps, calories, distance. Additional metrics depend on the configured backend; see health://device-profile. aggregation_minutes: 1..1440. No arbitrary SQL.

sync_healthA

Update the selected local cache and report actual record-time advancement.

Gadgetbridge exports and pulls its database over ADB; refresh_app=true first requests recorded-data synchronization from the band and waits for completion. Xiaomi Health reads through SSH; refresh_app=true invokes its internal background synchronization. No screen interaction or new physiological measurement is requested. Configure the transport once; cached queries still work when the phone is unavailable. Concurrent syncs share a single writer; timeout_seconds: 1..180.

measure_heart_rateA

Request one live heart-rate reading from the connected, worn Mi Band, then stop.

Uses the app's authenticated Bluetooth connection, not the historical database. Reports received_at (host receipt time), start/stop acknowledgments and cleanup errors. No reading may be available if the band is not worn or disconnected. Timeout: 30..90s. Current-state queries prefer a newer successful live reading; daily aggregates remain based on recorded history. Always attempts to stop; check stop_confirmed rather than assuming success. Requires Xiaomi Health to be running with its band connection available.

get_band_scheduleA

Read actual band alarms/reminders, their IDs, repeat rules and device capacity.

Reconnect is automatic and bounded. Alarm time is the band's local wall clock; reminder timestamps are converted from UTC for display in the selected IANA timezone. timeout_seconds: 5..90. No data is invented if a device response is unavailable. Read again to reconcile an earlier write whose outcome was unknown. timezone defaults to the server setting.

set_band_alarmA

Create or update one band alarm, preserving other alarms and verifying by read-back.

time is HH:MM in the band's local wall clock. weekdays uses ISO Monday=1..Sunday=7; [] means once, all seven means daily. Omit alarm_id to create; provide a listed ID to update that existing alarm. Supply the complete desired time/weekdays/enabled values. timezone labels the wall clock; it does not change the band's timezone. A lost write response is reconciled by reading back, never by blindly repeating the write. timeout_seconds: 5..90.

set_band_reminderA

Create or update one wrist reminder, then verify its actual stored fields.

at is an ISO timestamp with UTC offset; wire dates/times are UTC. title is the text shown on the band. Omit reminder_id to create, or use a listed ID to update. Supply all desired fields; unrelated entries are preserved. Recurrence follows the band's UTC schedule, so it does not automatically track local daylight-saving changes. On an unknown result inspect get_band_schedule before attempting another create. timeout_seconds: 5..90.

delete_band_scheduleA

Delete only the identified band alarm/reminder and verify its absence by read-back.

Obtain item_id from get_band_schedule. Other entries remain unchanged. Unknown write outcomes are reported explicitly; a transport acknowledgment alone is not success. timeout_seconds: 5..90.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
health_status_resourceLast sync result without contacting the phone.
device_profileFixed band capabilities and tool boundaries; no device discovery call required.

TDQS

A4.2/5.0

Scored across 11 tools

Disambiguation3/5

Most tools target distinct resources, but get_health_status and get_current_state both return recent HR, steps, and sleep/workout information, creating real ambiguity. get_band_status also overlaps with get_current_state on battery data. Detailed descriptions help, but an agent could still misselect among the health/state read tools.

Naming Consistency5/5

Tool names follow a consistent verb_noun snake_case pattern: get_*, set_*, delete_*, sync_*, query_*, measure_*. Even the generic delete_band_schedule is predictable given get_band_schedule covers both alarms and reminders.

Tool Count5/5

With 11 tools, the server is well-scoped for a Mi Band health and schedule domain. The count covers device status, health data retrieval, synchronization, live measurement, and schedule management without feeling bloated.

Completeness5/5

The tool surface covers the domain well: cached and fresh health data retrieval, daily summaries, bounded detail queries, explicit sync, live heart-rate measurement, and full create/read/update/delete for band alarms and reminders. No critical dead-ends are apparent for the stated purpose.

Maintenance

ActivityMaintained
ResponsivenessNo issues