Skip to main content
Glama
cambroussard9

trail-factors

save_ride_blocks

Store one stationary ride's structured resistance and RPM blocks, preserving raw text and prior revisions when superseding, so athlete-entered workout details are saved as a clear, end-anchored log.

Instructions

Store one stationary ride's block structure. THE ONE tool that writes athlete input.

A writer is a deliberate act: the watch cannot record resistance or RPM,
and nothing else in this system does either, so there is no existing
channel this competes with. Perceived effort is NOT a field here --
Garmin's own self-evaluation, where the device asked for one, is the
effort channel (see session_load), and a second would be two places for
one answer.

Args:
    payload: a JSON object. Required: run_id (or activity_id), raw_text,
        blocks. Optional: events, machine_totals.
    supersede: replace an existing log for this ride, AS AN ARGUMENT
        BESIDE the payload and never a field inside it. The previous
        revision is KEPT.

BLOCKS ARE END-ANCHORED: each entry is {resistance, end_min, rpm?}, and
start_min is the previous entry's end (0 for the first). Supplying
start_min is REJECTED -- one way to state a boundary means no way for two
statements to disagree. Storage is explicit [start_min, end_min).

resistance is DECIMAL knob-turns from closed (quarter turns such as 4.25,
4.5, 4.75 are ordinary values), validated against [0, MAX]. That ceiling is
DECLARED, not
measured, until the athlete tests where the knob stops.

rpm is a number or [low, high] and is stored as [low, high], NEVER
collapsed to a midpoint -- a midpoint invents precision the recollection
does not have. Absent is absent; a log with no RPM at all is complete.

raw_text is REQUIRED and stored VERBATIM through every revision. The
parsed blocks are an interpretation of it; the text is the record, for the
same reason bronze keeps the raw file.

AMBIGUITY IS REFUSED, NOT RESOLVED. This tool takes already-structured
blocks; overlapping or contradictory entries are rejected naming both.
Parsing prose is the chat's job, at save time, with the athlete present.

Athlete-recalled average HR is NOT a field here -- the watch's HR is
authoritative and already in the corpus. It survives in raw_text only.

Input Schema

NameRequiredDescriptionDefault
payloadYes
supersedeNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/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 thoroughly: supersede keeps the previous revision, ambiguity is refused rather than resolved, start_min is rejected, raw_text is stored verbatim through revisions, and RPM is never collapsed to a midpoint. It also discloses validation against a declared ceiling and what is intentionally not stored.

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

Conciseness3/5

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

The purpose is front-loaded, but the description runs long with philosophical asides such as the bronze-file analogy and repeated framing of what is not a field. Much of the content is valuable, but several sentences could be compressed without losing operational meaning.

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?

For a write tool with no annotations and a rich behavioral surface, the description is complete: it covers required and optional payload contents, supersede semantics, block anchoring, resistance and RPM rules, raw text preservation, ambiguity rejection, and exclusions. An output schema exists, so return-value detail is appropriately omitted.

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: payload is broken into required fields (run_id/activity_id, raw_text, blocks) and optional fields (events, machine_totals), supersede is explained as an argument beside the payload rather than a field inside it. Block entry structure and end-anchoring rules add meaning far beyond the bare schema.

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?

The first sentence gives a precise verb and resource: 'Store one stationary ride's block structure.' It immediately distinguishes this tool from all siblings by declaring it 'THE ONE tool that writes athlete input,' making its unique write role unambiguous.

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?

It explicitly states when to use this tool and when not to use related fields: perceived effort is excluded in favor of session_load, athlete-recalled HR is excluded because the watch is authoritative, and parsing prose belongs to the chat at save time. These exclusions and alternatives leave little inference.

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