Skip to main content
Glama

get_archive_metadata

Inspect Garmin Local Archive health and completeness, including coverage stats, sync/quality logs, device tables, and token events. Select an artefact by kind and optional date range.

Instructions

Read archive-state metadata: how complete and healthy the archive is, plus sync and quality logs. kind selects the artefact:

  • "stats": small coverage/quality overview (total, high/standard/failed counts, date range, coverage_pct, last sync, integrity warnings). Use this for "how big/complete/healthy is my archive" questions.

  • "device_table": devices seen in the archive, with date range and number of days each.

  • "quality_log": per-day quality register.

  • "source_api_log": one record per data fetch (time, source, validator status, endpoints fetched).

  • "token_log": token events (created/invalidated/blocked/valid), never token contents.

  • "capability_config": which optional Garmin endpoints are enabled (may be empty).

  • "daily_logs", "fail_logs", "recent_logs": sanitized sync log lines, one entry per log file.

date_from/date_to (ISO "YYYY-MM-DD", inclusive) are needed for "quality_log", "source_api_log", "daily_logs", "fail_logs" and "recent_logs": without both dates these return an empty result (no error, no default range). They are ignored for the other kinds. The log kinds are large (a single week of daily_logs is several hundred KB), so request only the days you need and prefer "stats" for overview questions.

Result: {"data": ..., "error": None}. An unknown kind raises an error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYes
date_toNo
date_fromNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: silent empty results when date_from/date_to are missing (no error, no default range), dates ignored for other kinds, log payloads of several hundred KB, token_log never exposing token contents, and an error on unknown kind. These are exactly the non-obvious behaviors an agent needs.

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?

Front-loaded purpose followed by a clean bulleted kind list, so it is easy to scan. It is somewhat long and mildly repetitive — the log kinds are re-listed once in the bullet list, again in the date-requirement sentence, and again in the size warning — but each repetition carries a distinct constraint, so the cost is small.

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?

No output schema exists, yet the description documents the response envelope ({"data": ..., "error": None}) and the error behavior for unknown kinds. Combined with complete parameter semantics and the size/date caveats, an agent has everything required to call this correctly.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate — and it does. It defines the full domain of 'kind', gives ISO 'YYYY-MM-DD' inclusive semantics for date_from/date_to, and states precisely which kinds require both dates and which ignore them. Nothing about the three parameters is left ambiguous.

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

Purpose5/5

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

States a specific verb+resource ('Read archive-state metadata') and then enumerates every accepted 'kind' with a concrete description of what each returns (stats, device_table, quality_log, source_api_log, token_log, capability_config, log kinds). This is far more than a name restatement and clearly separates it from siblings like query_health or gaps.

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

Usage Guidelines5/5

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

Explicit routing guidance: 'Use this for "how big/complete/healthy is my archive" questions', and 'prefer "stats" for overview questions'. It also gives the when-not/no-op condition — the log kinds silently return empty without both dates — and warns to request only needed days because logs are large.

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