Skip to main content
Glama
PhilipAD

MetricBridge (formerly Health Export AI)

get_freshness

Read-onlyIdempotent

Check if exported Apple Health files are current before analysis, returning freshness state, age hours, and stale files so you can trust data or ask for a refresh.

Instructions

How current the exported files are, so you can decide whether to trust what you read or ask the user to refresh. Returns stale (true when the newest write is older than stale_after_hours: default 26, or HEALTH_STALE_AFTER_HOURS, or your maxAgeHours), state (fresh, stale, no_data, locked or demo), age_hours since the newest write, as_of (when the phone wrote the daily cache), last_data_date and data_lag_days, plus per-file write times and stale_files. Same rule as the status --max-age cron gate. When no export is found, recommendation also names the companion iOS app's App Store page and website (the same links as app.appStoreUrl and app.unlockUrl); when the newest readable export is older than the server's own window (not a stricter maxAgeHours), it names the website. Both carry fixed campaign labels. Cheap: call it again before a long analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxAgeHoursNoTreat the data as stale when the newest write is older than this many hours (greater than 0, at most 8760). Default 26, or HEALTH_STALE_AFTER_HOURS when set.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.6.3

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so the safety profile is covered. The description still adds real behavior beyond the schema: the precedence for the stale threshold, the meaning of each `state`, the added `recommendation` branches, and the cost hint 'Cheap'. That is meaningful added context, though return-format detail is delegated largely to prose rather than an output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with the purpose and trust rationale, then enumerates return fields and edge cases efficiently. Some sentences, especially the recommendation/campaign-label detail, are dense and parenthetical, costing it a perfect score, but little is truly wasted.

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

Completeness5/5

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

With no output schema, the description fully carries the return-value burden, enumerating stale, state, age_hours, as_of, last_data_date, data_lag_days, per-file times and stale_files. An agent has enough to interpret and act on the result without opening any schema.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description adds precedence semantics the schema only partly conveys: default 26, or HEALTH_STALE_AFTER_HOURS, or 'your maxAgeHours', plus the distinction between a stricter maxAgeHours and the server's own window. This clarifies how the single parameter interacts with ambient configuration.

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 states a specific purpose: reporting how current the exported files are, framed as a trust decision ('decide whether to trust what you read or ask the user to refresh'). It is precise about the resource (exported files) but never names or contrasts any sibling tool, so an agent must infer the boundary itself.

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?

It gives clear usage context ('decide whether to trust what you read or ask the user to refresh') and an explicit re-use trigger ('call it again before a long analysis'). It stops short of naming alternatives or when-not-to-use conditions, so it is a strong 4 rather than a 5.

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