health-hub
Provides tools for querying health data from Apple Health (iPhone Health app), including body measurements, steps, heart rate, sleep, and workouts, and for searching bundled Apple HealthKit documentation.
Provides tools for iOS development, enabling checking the development environment, building, installing, and reading logs from the iOS collector app.
Allows querying and logging health data stored in the local SQLite database, including samples, weekly reports, sync status, workouts, and meals.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@health-hubhow did my weight change last week?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Health Data Hub: iPhone collector + local Mac database + MCP
A lightweight, personal health-data collector. It moves the data in your iPhone's Health app to your own Mac, stores it as one SQLite file, and lets AI assistants such as Claude and Codex query it. No cloud, no account, no server.
Version 0.3.2 (changelog) · Status: in daily use by the author since 2026-10 (as of 2026-10-06) · iPhone with iOS 18+ and a Mac on the same Wi-Fi.
Want an AI assistant to install it for you? Hand docs/AGENT_INSTALL.md to Claude Code or Codex and it will follow the steps.
What it is
Three small parts in a line:
iPhone collector app (native Swift): reads the Health app and pushes new data to the Mac.
Mac receiver (Python, FastAPI): receives the data on your home Wi-Fi and writes it to the local SQLite file
data/health.sqlite.MCP server (Python, no dependencies): lets Claude Code, Codex and other AI assistants query the data, build weekly reports, and log workouts and meals by hand.
Related MCP server: cadence
What it does
Collects 11 data types automatically: body mass, lean body mass, body fat %, BMI, waist circumference, steps, heart rate, resting heart rate, heart rate variability (HRV), sleep and workouts. Field meanings: docs/health-data-fields.md.
Anything a smart scale or watch writes into the Health app is collected too — the collector reads the Health app and does not care which device wrote the data.
Ask your AI assistant directly: "How did my weight change last week?", "Am I sleeping enough?", "Give me this week's report."
Log workouts and meals by hand (
log_workout/log_meal).
Why
The Health app keeps its data on the phone: exporting means tapping through menus, the export is one huge XML file, and AI assistants cannot see it. Most sync services upload the data to someone else's server.
This project takes another route: the data only travels between your own phone and your own Mac, lands in a SQLite file you can open directly, and reaches your local AI assistant through MCP.
Scope
Built for one person, one iPhone and one Mac. It is not a multi-user platform.
Advantages:
Private: phone → home Wi-Fi → your Mac. No third party in between.
No loss, no duplicates: the phone keeps a sync position per data type; batches that fail to send wait in a local queue on the phone and are resent unchanged; the Mac deduplicates by sample uuid, so a resend is stored once.
Open format: one SQLite file any tool can read; schema in
server/schema.sql.Ready for AI: the MCP server plugs into Claude Code and Codex as is.
Light: no cloud service, database server or Docker. The Mac runs one Python process.
Tested: automated tests on both the Python and Swift sides, plus on-device acceptance.
Limits — what it does not do:
iPhone + Mac only. No Android, Windows or Linux phone side. The receiver can run anywhere Python runs, but
server/run.shuses macOSnetworksetupanddns-sd.Read-only. It never writes back to the Health app.
iOS background wake-ups are unreliable. iOS decides when to wake the app; the author measured 2 background wake-ups in 33 hours. So a Shortcuts automation opens the app on a schedule, which guarantees at least one sync a day, not real time.
Phone and Mac must share a Wi-Fi network (or you set up Tailscale as a backup path). While the Mac is off or asleep the data waits in the phone's queue and is resent later.
Scale data must reach the Health app first. A Eufy scale, for example, writes through its own app; only then can the collector read it.
Only the 11 types above. No ECG, blood oxygen, medications, etc.
No web UI. You query through MCP (an AI assistant) or read SQLite directly.
The app is not on the App Store. You build it with Xcode and install it yourself. A free Apple ID works, but the installed app expires after 7 days and must be reinstalled.
How it works
iPhone
┌─ Health app (HealthKit)
│ │ read only
│ ▼
└─ Collector app
· one sync position per data type
· failed batches are queued and resent
· syncs when the app opens / on background wake
│
│ HTTP POST + Bearer token → healthhub.local:8765
▼
Mac (same Wi-Fi)
┌─ Receiver: server/run.sh (FastAPI :8765)
│ POST /ingest · GET /health
│ │ dedupe by uuid, write
│ ▼
├─ data/health.sqlite
│ │
│ ▼
└─ MCP server health-hub ← Claude / CodexIncremental sync: the app uses HealthKit anchored queries to fetch only what is new. A type's anchor moves forward only after the Mac confirms receipt, so a failure halfway never loses data.
When it syncs: when the app opens (with the "打开 App 时自动同步" — auto-sync on open — switch on), and when iOS wakes it in the background, which is rare. A daily Shortcuts automation is the safety net.
Finding the Mac: the receiver binds to the Mac's Wi-Fi address and announces the Bonjour name
healthhub.local, so the phone keeps working when the Mac's IP changes.Auth: the Mac generates a 32-character access token; it is baked into the app at build time (locally, never in git) and sent with every request.
Full protocol: docs/sync-protocol.md.
Install
Prerequisites
A Mac with Xcode (iOS 18 SDK or later), uv, XcodeGen (
brew install xcodegen) and Python 3.9+.An iPhone on iOS 18+, connected by cable, with Developer Mode on.
An Apple ID signed in under Xcode → Settings → Accounts (a paid developer account is easier).
Step 1: Mac receiver
git clone <this-repo-url> health-hub && cd health-hub
uv sync # install Python dependencies
uv run python -m server.token new # create the access token in data/ingest_token (mode 0600)
server/run.sh # start the receiver: Wi-Fi address :8765, announces healthhub.localCheck from another terminal: curl http://healthhub.local:8765/health returns {"status":"ok"}.
On first run macOS may ask whether to accept incoming connections — choose Allow.
To keep it running, start server/run.sh from launchd or your login items.
Step 2: build and install the iPhone app
Create
ios/local.xcconfig(already in.gitignore):DEVELOPMENT_TEAM = <your 10-character Team ID> PRODUCT_BUNDLE_IDENTIFIER = com.<your-name>.healthcollectorsecurity find-identity -v -p codesigningshows the Team ID in parentheses.Bake the Mac address and token into the app, generate the project and build:
ios/make_local_config.sh # writes ios/HealthCollector/LocalConfig.plist (not in git; never prints the token) cd ios && xcodegen generate xcodebuild -project HealthCollector.xcodeproj -scheme HealthCollector \ -destination 'generic/platform=iOS' -configuration Debug \ -allowProvisioningUpdates buildOr, after
xcodegen generate, openios/HealthCollector.xcodeprojin Xcode, pick your iPhone and press Run.Install on the phone from the command line:
APP=$(find ~/Library/Developer/Xcode/DerivedData -path '*Debug-iphoneos/HealthCollector.app' | head -1) xcrun devicectl list devices # find your device name xcrun devicectl device install app --device "<device-name>" "$APP"On first install, trust the developer on the phone under Settings → General → VPN & Device Management.
Step 3: first run on the phone
The app's interface is in Chinese; the English meaning is in parentheses.
Open the collector, tap 授权读取健康数据 (allow reading health data) and allow everything in the system sheet.
Tap 测试连接 (test connection); it should succeed — the Mac address and token are already filled in.
Tap 立即同步 (sync now). The first sync uploads your full history to the Mac.
Turn on 打开 App 时自动同步 (auto-sync on open). The same switch also controls background sync.
Step 4: Shortcuts automations for a daily sync (recommended)
iOS rarely wakes the app in the background, so in the Shortcuts app → Automation, create two automations:
Time of Day: every day at 12:00 → action "Open App" → the collector → "Run Immediately".
Charger: when connected → open the collector → "Run Immediately".
Opening the app triggers a sync. Automations can only be created on the phone, not from the Mac.
Usage
Connect an AI assistant (MCP)
Claude Code: .mcp.json at the repo root already registers health-hub. Start claude in the repo; the first time it asks whether to enable this project MCP server — approve it.
Codex: add to ~/.codex/config.toml (use your absolute path):
[mcp_servers.health-hub]
command = "python3"
args = ["/absolute/path/health-hub/src/health_hub_mcp/server.py"]Then ask: "health-hub weight for the last 7 days", "weekly report", "how is sync doing?"
Tool | What it does |
| query samples by type and time range |
| one-week summary (weight, steps, sleep, heart rate…) |
| last sync time and row counts per type |
| log a workout / meal by hand |
| for developing the app: check the environment, build, install, read logs (output redacted) |
| search the bundled Apple HealthKit documentation |
Without an AI assistant, from the command line:
python3 src/health_hub_mcp/server.py sync-status # sync status
python3 src/health_hub_mcp/server.py env-check # iOS development environment check
python3 src/health_hub_mcp/server.py kb-search "background delivery"Variable | Purpose | Default |
| data directory |
|
| access token (wins over | — |
| bundle ID used by |
|
| device name used by | — (put it in the git-ignored |
Agent skill: ios-dev-env
The repo ships a Claude Code skill at .claude/skills/ios-dev-env/SKILL.md. It teaches the assistant to check the iOS toolchain, generate the project, build, install, read logs and debug signing, and it keeps secrets (Team ID, certificates, device IDs) out of chat and git.
In this project only: nothing to install. Claude Code loads project skills from
.claude/skills/when started in the repo. Say "build the collector", "install on my phone", "signing error", or type/ios-dev-env.In every project: copy it into your personal skills directory:
mkdir -p ~/.claude/skills && cp -R .claude/skills/ios-dev-env ~/.claude/skills/Codex: ask Codex to read
.claude/skills/ios-dev-env/SKILL.mdand follow it; if your Codex version supports skills, you can copy the folder into its skills directory (see the Codex docs).Before first use: keep your own values out of git — device name in
local.env, bundle ID inios/local.xcconfig, and anything else about your machine in a git-ignored.claude/skills/ios-dev-env/local.md, which the skill reads first.
Documentation
Document | What is in it |
What the Health app can give you: the 11 types collected today with meaning and unit, every database column, sleep states, common metadata keys, and HealthKit types that could be added later | |
How the phone talks to the Mac: request and response fields, examples, timestamps, deduplication, transport, auth | |
Step-by-step install for Claude Code / Codex, with a check after every step | |
Every file and folder, and where new things go | |
What changed in each version |
Project layout
Path | Purpose |
| Swift package: sync engine, queue, encoding — all testable logic |
| thin iPhone app shell (HealthKit access, UI, background delivery) |
| Mac receiver: FastAPI app, token tool, |
| MCP server, also usable from the command line |
| bundled Apple documentation for the MCP knowledge-base tools |
| protocol, field reference, plans, device test records, agent install guide |
| pytest suites and fixtures |
| your database and token — git-ignored, never leaves the Mac |
Every file and folder: STRUCTURE.md.
For developers
uv run pytest # Python: unit / integration / contract / e2e
swift test --package-path ios/CollectorCore # Swift collector coreChanges per version: CHANGELOG.md · How to contribute: CONTRIBUTING.md · Reporting security problems: SECURITY.md.
Privacy
data/(database, token),ios/local.xcconfig,ios/HealthCollector/LocalConfig.plistand the generated.xcodeprojare all git-ignored.tests/_privacy.pychecks that identifiers such as Team IDs, device UDIDs, Tailscale IPs and certificate fingerprints never enter the repo.
License
MIT. The optional reference material described in kb/README.md is not included and keeps its own terms.
Available Tools
11 toolsios_buildC
xcodebuild 构建采集器(必要时先 xcodegen)。
| Name | Required | Description | Default |
|---|---|---|---|
| config | No | ||
| warnings | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden and does not meet it. It implies a mutating build operation with side effects (generating project files via xcodegen, writing build artifacts) but says nothing about permissions, duration, failure modes, or whether it modifies the workspace.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The single sentence is front-loaded and free of padding, which is good. But its brevity comes at the cost of substance rather than from efficient expression of complete information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a build tool with no annotations, no output schema, and two undocumented parameters, the description is far too thin. An agent cannot tell what the tool returns, what it modifies, or how to invoke it correctly relative to the other iOS tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the description mentions neither 'config' nor 'warnings'. It does not explain the debug/release enum values or what the warnings flag toggles, so it fails to compensate for the undocumented parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names the underlying command (xcodebuild) and implies a build action, which distinguishes it from siblings like ios_install and ios_logs. However, the noun '采集器' (collector) is vague about what is actually produced or gathered, so the agent must guess whether this compiles, gathers build artifacts, or just wraps the command.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The parenthetical '必要时先 xcodegen' gives a conditional prerequisite, which is the only usage hint present. There is no guidance on when to choose this over ios_env_check, ios_install, or ios_logs, and no statement of required preconditions or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ios_env_checkB
检查 Xcode/签名身份/已配对设备/工具/工程文件(已脱敏)。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. The '(已脱敏)' note usefully discloses that output is redacted of sensitive data, but it says nothing about whether the operation is read-only, what it returns, or how long it takes. One behavioral hint is not enough for a tool with zero annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single compact sentence front-loads the verb and lists the checked resources without filler. Slightly dense given the parenthetical redaction note, but nothing is wasted.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter diagnostic with no output schema and no annotations, the description enumerates the inspected surfaces, which is the core information. However, it omits what a caller should do with results and when to invoke it relative to the build/install siblings.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so there is nothing to disambiguate; baseline 4 applies. The description correctly implies no inputs are needed for a full environment sweep.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (检查/check) and enumerates the concrete resources inspected: Xcode, signing identities, paired devices, tooling, and project files. This clearly distinguishes it from siblings like ios_build, ios_install, and ios_logs, though it never labels itself a preflight/environment diagnostic explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to run this versus the sibling ios_* tools; the agent must infer it is a pre-build environment sanity check. No prerequisites, no ordering advice relative to ios_build/ios_install.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ios_installC
把最新 Debug 构建装到 iPhone 并启动。
| Name | Required | Description | Default |
|---|---|---|---|
| device | No | ||
| launch | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden, yet it discloses almost nothing: not whether an existing install is overwritten, whether it fails on an unconnected device, whether it depends on a prior ios_build, or what happens on launch failure. It does convey the mutate-and-launch side effect, which is the only real behavioral signal.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single short sentence, front-loaded with the action and target — efficient, but its brevity comes from omission rather than tight editing, so it under-specifies rather than being genuinely concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a mutation-style tool with zero annotations, no output schema, and 0% schema coverage, the description is far too thin. An agent cannot determine prerequisites, device targeting, or failure behavior from what is given.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% for two parameters (device, launch). The description mentions 'iPhone' and 'launch' only as narrative, not as parameter semantics: it does not explain how to target a specific device, nor that launching is actually controlled by an optional boolean rather than always happening.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: install the latest Debug build onto an iPhone and launch it. This is distinguishable from siblings like ios_build (which builds) and ios_env_check, though it never explicitly names or contrasts with them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No indication of when to use this versus ios_build or ios_env_check, nor any prerequisite (e.g., a build must already exist, a device must be connected/paired, provisioning required). The agent must infer the whole workflow.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ios_logsC
抓采集器运行日志 N 秒。
| Name | Required | Description | Default |
|---|---|---|---|
| device | No | ||
| seconds | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. It discloses only one trait — that capture is time-bounded to N seconds — and says nothing about whether the call blocks for that duration, where logs are returned or written, or what happens if the device is unreachable.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no filler, which is structurally sound. However, at this length it reads as under-specification rather than true conciseness, since key facts (output destination, defaults) were dropped rather than compressed.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema, no annotations, and zero parameter documentation mean the description is the only source of truth, and it omits defaults, output format, and device-targeting behavior. For a tool that likely has side effects (writing log files), that is a meaningful shortfall.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% for both parameters. The description hints that 'seconds' controls duration, but never names it, gives no default (the param is optional) or units beyond the implicit 'seconds', and the 'device' parameter is entirely undocumented in both schema and description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description pairs a specific verb ('抓' / capture) with a specific resource ('采集器运行日志' / collector runtime logs) plus a scope ('N 秒'), so an agent knows it triggers a timed log capture. It does not, however, differentiate itself from neighbours such as ios_env_check or sync_status, which also touch device state.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to reach for this tool versus ios_env_check, ios_build, or ios_install, and no stated prerequisites (e.g. a connected/installed device). The reader must infer the whole usage context from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
kb_listB
列出知识库资源(Apple HealthKit 官方文档 + kingstinct 参考)。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden, but it only tells the agent what content exists, not that this is a safe read-only enumeration, whether the list is paginated, or how large it may be. For a zero-parameter enumeration the risk is low, so this is a modest gap rather than a critical one.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single short sentence with no filler, and the resource being listed is front-loaded. It is appropriately sized for a trivial zero-arg tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and no annotations, the description should at least hint at the shape of the result (identifiers, titles, or counts) so an agent can chain into kb_search. It identifies the corpus but not the return shape.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes no parameters, so there is nothing to document; baseline 4 applies. The description correctly implies the call is unconditional.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('列出'/list) and resource ('知识库资源'), and even names the content scope (Apple HealthKit docs + kingstinct reference), so an agent knows exactly what comes back. It does not explicitly contrast with the sibling kb_search, so it falls short of a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no statement of when to use this versus kb_search, which is the obvious alternative for the same knowledge base. The listing intent is only implied by the verb.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
kb_searchC
全文查找知识库。scope=apple|kingstinct|all
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | ||
| limit | No | ||
| scope | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It implies a read-only lookup but says nothing about permissions, rate limits, pagination, or result ordering, and gives no sense of what a search response contains.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely short and front-loaded, which is structurally good, but the second sentence merely repeats the schema enum and the whole is under-specified rather than truly concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no annotations, no output schema, and three parameters at 0% schema coverage, the description should explain query semantics and result behavior. It omits both, leaving an agent with insufficient information to invoke the tool confidently.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% for all three parameters. The description only restates the enum values for scope, which the schema already encodes, and adds no meaning for q or limit (e.g., matching mode, default page size), so the coverage gap is not compensated.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: full-text search over a knowledge base. However, it does not differentiate this tool from the sibling kb_list, which also operates on the knowledge base, so an agent cannot tell the two apart from the description alone.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus alternatives such as kb_list or query_samples. The only usage hint is the scope enumeration, which selects a data source rather than a scenario, so the agent is left to infer all routing decisions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
log_mealC
录入一餐(照片估算或手动)。items=[{name,grams,kcal}]
| Name | Required | Description | Default |
|---|---|---|---|
| ts | No | ||
| kcal | Yes | ||
| note | No | ||
| items | No | ||
| confidence | No | ||
| photo_path | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It does not say whether logging is additive or overwrites an existing entry, whether timestamps default to now, what permissions are needed, or what happens when only kcal is supplied. For a write tool with zero annotation coverage this is a substantial gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two compact clauses, front-loaded with the action, with the parameter hint appended. Nothing is padded, though the brevity edges toward under-specification rather than true economy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
A 6-parameter mutation tool with no annotations, no output schema, and 0% schema description coverage gets only a single line of prose. An agent can guess the core intent but lacks the detail needed to populate confidence, ts, photo_path, or note correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% across 6 parameters, so the description must compensate. It only clarifies the shape of one parameter, items=[{name,grams,kcal}], and even that omits per-item types. ts, note, confidence, and photo_path remain undocumented in both the schema and the description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb+resource (录入一餐 / log a meal) and immediately distinguishes the two capture modes (photo estimate vs manual). It is clearly separable from siblings like log_workout or query_samples, though it never names an alternative explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
"照片估算或手动" implies the two invocation paths (pass photo_path vs enter items/kcal directly), which is useful implied usage. However there is no statement of when to prefer one over the other, no prerequisites, and no exclusions relative to sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
log_workoutC
录入一次运动(source=manual)。
| Name | Required | Description | Default |
|---|---|---|---|
| kcal | No | ||
| kind | Yes | ||
| note | No | ||
| start | Yes | ||
| distance_km | No | ||
| duration_min | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It does not disclose required permissions, deduplication behavior, validation rules, what happens with partial data, or what the call returns – all relevant for a write/logging tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single short sentence with no filler and the purpose front-loaded, but its brevity comes from under-specification rather than disciplined editing – nothing an agent needs to call the tool is covered.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a six-parameter mutation tool with no annotations, no output schema, and zero schema descriptions, the description is wholly inadequate: required fields, units, and expected behavior are all unstated.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Six parameters with 0% schema description coverage, yet the description names none of them (kind, start, kcal, note, distance_km, duration_min). 'source=manual' is not even a parameter in the schema, so it adds no actionable parameter meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('录入一次运动' = log a workout), which is clearly distinguishable from sibling log_meal and from the read/report tools. It does not, however, differentiate itself from siblings explicitly or state scope (single entry vs batch).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No when-to-use guidance, no prerequisites, and no mention of alternatives (e.g. log_meal for food). The only qualifier, 'source=manual', describes provenance but not a selection condition.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
query_samplesC
读 HealthKit 样本。type 可写全名或简写(bodyMass/bodyFatPercentage/stepCount/heartRate…);agg=daily 按天聚合。
| Name | Required | Description | Default |
|---|---|---|---|
| agg | No | ||
| end | No | 止(不含):YYYY-MM-DD(UTC 0 点)或带时区 ISO8601 | |
| type | Yes | ||
| limit | No | ||
| start | No | 起(含):YYYY-MM-DD(UTC 0 点)或带时区 ISO8601 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. '读' implies a read-only operation, but it omits HealthKit authorization requirements, pagination behavior implied by the limit parameter, and return format. Substantial gaps for a data-access tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Compact two-clause structure with the core purpose front-loaded, followed by parameter hints. Both sentences earn their place, with only the trailing ellipsis example list slightly loose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 5-parameter tool with no annotations and no output schema, the description covers type and agg but leaves limit and the shape of the returned samples unexplained. It is minimally adequate but not complete enough for an agent to call it with full confidence.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is only 40%, so the description must compensate: it usefully clarifies that type accepts full names or abbreviations with concrete examples (bodyMass, stepCount, heartRate) and explains that agg=daily aggregates by day, adding meaning beyond the bare enum. However, limit remains undocumented in both schema and description, so compensation is incomplete.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('读 HealthKit 样本' = read HealthKit samples), which is clearly distinct from the write-oriented siblings log_workout, log_meal, and sync_status. However, it never names an alternative or scoping condition to differentiate itself from other read tools like weekly_report.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no explicit when-to-use or when-not-to-use guidance. The note that agg=daily aggregates by day hints at a usage mode but stops short of telling the agent when to pick daily vs raw, or when to prefer this tool over siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
sync_statusA
采集器同步状态与库内样本数、待处理照片数。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full behavioral burden. It implies a side-effect-free read by describing only reported values, which is useful, but it does not disclose whether the sync status is fetched live or cached, how often it refreshes, or what error/offline states look like.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence with no filler; every clause names a distinct piece of information the tool returns.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter status tool with no output schema, the description usefully enumerates the three values returned, which is the main thing an agent needs. It would be stronger if it stated freshness or how to interpret a not-synced state.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so the schema has nothing to document and the baseline of 4 applies. The description's enumeration of returned fields adds context but concerns outputs rather than parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names the resource (the collector's sync status) and enumerates the returned data (library sample count, pending photo count), so an agent knows exactly what question this tool answers. It is not a tautology of the name 'sync_status'. It stops short of a 5 because it uses no explicit verb and offers no contrast with any sibling, though no sibling in the list covers sync state.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no statement of when to call this tool, no preconditions, and no mention of alternatives such as query_samples, which plausibly overlaps with the sample-count data reported here. The agent must infer usage entirely from the returned-field list.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
weekly_reportB
近 7 天周报:体重/体脂趋势、运动、饮食、步数。
| Name | Required | Description | Default |
|---|---|---|---|
| week_end | No | YYYY-MM-DD 或带时区 ISO8601(转 UTC 取日期),默认今天(UTC);窗口为该日及之前共 7 个 UTC 日 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It discloses the report's content categories (trends, exercise, diet, steps), which is genuine value beyond the schema, but says nothing about read-only safety, whether data freshness/sync matters, or result format. Partial coverage for an unannotated tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single compact sentence that front-loads the scope ('近 7 天') before the content list. Nothing is wasted, though the extreme terseness leaves no room for routing or behavioral cues that the tool would benefit from.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and no annotations, the description should carry more of the return-value and safety load. It lists the data domains covered, which partially substitutes for an output schema, but omits output shape, freshness/sync dependencies, and any read-only framing. Minimally adequate for a single-parameter report tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, and the sole parameter week_end is fully documented in the schema, including the YYYY-MM-DD/ISO8601 handling and the UTC window definition. The description adds nothing about week_end, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a concrete resource and scope: a 7-day report covering weight/body-fat trends, exercise, diet, and steps. This is clearly distinct from raw-data siblings like query_samples or log_workout, though it never names or contrasts them explicitly. Purpose is clear but sibling differentiation is left to inference.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus alternatives such as query_samples (raw samples) or log_workout/log_meal (individual entries). The '近 7 天' scope implies a summary use case, but no when/when-not conditions or prerequisites (e.g. data must be synced first) are stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
11 tool updates
v0.3.2- First observed
ios_build - First observed
ios_env_check - First observed
ios_install - First observed
ios_logs - First observed
kb_list - First observed
kb_search - First observed
log_meal - First observed
log_workout - First observed
query_samples - First observed
sync_status - First observed
weekly_report
TDQS
Scored across 11 tools
Most tools have distinct purposes: health logging, reporting, iOS build/install diagnostics, and knowledge-base search are clearly separated. There is minor conceptual overlap between query_samples and weekly_report for reading health metrics, and between sync_status and ios_logs for diagnostics, but descriptions help distinguish them.
All tool names use consistent snake_case with predictable prefixes and action/resource patterns, such as log_workout, log_meal, ios_build, ios_install, kb_list, and kb_search. The convention is uniform throughout the set.
With 11 tools, the server covers three coherent functional areas without obvious bloat. Each tool appears to earn its place by serving a distinct workflow: health data handling, iOS collector management, or knowledge-base access.
The surface supports reading samples, logging workouts/meals, weekly reporting, sync status, iOS build/install/logs, and knowledge-base search. However, it lacks update/delete operations for logged entries and has no direct query/list for meals or workouts beyond the weekly aggregate, which are notable gaps for a health-tracking hub.
Maintenance
Related MCP Connectors
Your Apple Health data, food diary and lifts, for ChatGPT, Claude and Gemini. Approved on iPhone.
- SomviaOAuthapp.somvia
Apple Health training load, recovery, HRV and workout detail for Claude, ChatGPT and any MCP client.
Calorie tracker app for ChatGPT and Claude: read meals, macros, weight and log meals from chat.
Log meals, water, and weight to Garmin Connect from Claude or ChatGPT.
Related MCP Servers
- AlicenseAqualityBmaintenanceApple HealthKit → PostgreSQL sync + MCP server for Claude Code, Cursor, and Ollama. Open-source iOS app with reliable background sync (HKObserverQuery). 11 tools covering health summary, sleep, HRV trends, workouts, daily snapshots, metric stats, period comparison, and coaching briefs. Supports Supabase, Neon, and self-hosted Postgres. Privacy-first: your data goes to your own database.113MIT
- AlicenseAqualityCmaintenanceProvides Claude with real-time access to local health data including sleep, recovery, strain, and workouts from WHOOP and Apple Health, enabling informed context-aware interactions.61MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to read Apple Health data through three tools: current stats, detailed metrics, and trends. Deployable to Cloudflare with a one-click phone setup, exposing only read-only access.MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to read your own Apple Health data through a self-hosted SQLite mirror, allowing them to query health metrics, workouts, meals, and strength logs without sending data to the cloud.477 PyPI3MIT