Skip to main content
Glama
Barbaroso

apple-health-semantic-mcp

by Barbaroso

health_query

Run read-only DuckDB SQL queries on Apple Health export data to extract health metrics, using a semantic layer to prevent aggregation mistakes.

Instructions

Run a read-only DuckDB SQL query against the health tables. Call health_schema first so you know the columns and the correct aggregate function for each metric.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum rows to return (default 1000, maximum 5000).
queryYesA single SELECT or WITH statement.
Behavior3/5

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

With no annotations provided, the description carries full responsibility for behavioral disclosure. It adds the critical read-only guarantee and hints at needing the schema, but it omits details like error handling, result formatting, or any potential side effects. This is adequate but not rich.

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?

Two concise sentences with the core purpose front-loaded in the first sentence and a useful prerequisite in the second. Every word earns its place, with no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with two parameters and no output schema, the description is adequately complete. It tells the user the essential prerequisite (call health_schema first) and the read-only nature. It could be more explicit about when to use this instead of health_report, but that is a minor gap given the clarity of the query intent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already documents both parameters (query as a single SELECT/WITH statement, limit with max rows) with 100% coverage. The description adds no additional parameter-specific semantics, so it neither compensates for nor improves upon the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool runs a read-only DuckDB SQL query against health tables, identifying the verb, resource, and scope. It is distinguishable from siblings by emphasizing arbitrary SQL queries, though it does not explicitly name alternatives or contrast with health_report or health_schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear context: use for read-only SQL queries on health data, and explicitly instructs to call health_schema first as a prerequisite. It does not specify when not to use or mention alternative tools, but the guidance is actionable and sufficient for most cases.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Barbaroso/apple-health-semantic-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server