Skip to main content
Glama

get_activity_fit_messages

Read-only

Retrieve and parse an activity's original FIT file messages in file order, with optional message-type filtering and pagination, to access raw device data unmerged with Garmin Connect edits.

Instructions

Retrieve and generically parse an activity's original FIT file.

    This is the source-of-truth endpoint for original device activity data.
    It returns every message and every field emitted by the FIT decoder
    without applying sport-specific curation. Messages remain in file order,
    and each field includes its decoded value plus units and definition
    number when available. Unknown and duplicate fields are retained.

    Garmin Connect edits made after upload may be stored only in Garmin's
    service and are not necessarily written back into the original FIT file.
    This tool intentionally does not merge those service-side edits.

    High-frequency ``record`` messages are counted but omitted by default.
    Other message types occurring more than 100 times are also inventoried
    but omitted from an unfiltered default response. Request those types
    explicitly with message_types. All returned messages are bounded by
    message_offset/message_limit (maximum 5000 per call); follow
    pagination.next_offset until absent to retrieve the full selected stream.

    Use message_types to return only particular FIT message types while
    message_counts still inventories the complete file. For example, a
    strength workout can usually be inspected efficiently with
    ["session", "lap", "set", "exercise_title"]. Message type names are
    case-insensitive and should use FIT/fitparse snake_case names.

    Args:
        activity_id: Garmin activity ID.
        message_types: Optional list of FIT message types to return. Omit to
                       return low-frequency non-record message types.
        include_records: Include the high-frequency record stream (default false).
        message_offset: Zero-based offset within the selected message stream.
        message_limit: Maximum messages returned per call, 1-5000 (default 1000).
    

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "activity_id": "<activity_id>"
    },
    "name": "get_activity_fit_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
activity_idYes
message_limitNo
message_typesNo
message_offsetNo
include_recordsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnly, non-destructive, open-world access, so safety is covered. The description then adds substantial context beyond them: default omission of record messages, a 100-occurrence inventory-and-omit rule, a hard 5000-message cap, pagination continuation, and the deliberate decision not to merge Garmin service-side edits. These are meaningful behavioral disclosures, but a 3 reflects that most of them are more operational/pagination detail than mutation or side-effect disclosure.

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?

Well front-loaded: identity and purpose first, then curation caveat, then default-omission and pagination rules, then a parameter list. Every paragraph is on-topic, though the Garmin-Connect-edits caveat and the repeated restatement of default omission could be tightened by a sentence or two.

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 high-complexity, five-parameter tool with no output schema, the description covers what an agent needs: what is returned (every message and field in file order, values with units and definition numbers), what is withheld by default and why, how to request it, how to page, and the hard per-call cap. Nothing essential to calling it correctly is missing.

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 description coverage is 0%, so the description must carry all parameter meaning, and it does via a full Args block covering all five parameters. It adds semantics the schema lacks: message_types is case-insensitive and should use FIT/fitparse snake_case names, omission means low-frequency non-record types, message_limit is bounded 1-5000 with a 1000 default, and message_offset is zero-based within the selected stream. This is exactly the compensation the low-coverage case calls for.

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?

States a specific verb and resource ('Retrieve and generically parse an activity's original FIT file') and scopes it precisely as the 'source-of-truth endpoint for original device activity data' with no sport-specific curation. An agent can tell this is the raw, unmerged FIT stream. It does not name the sibling get_activity_fit_data explicitly, so the boundary against curated FIT tools is inferred rather than stated.

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?

Gives clear operational guidance: use message_types to select types, include_records for the high-frequency record stream, and follow pagination.next_offset until absent. It supplies a concrete worked example (strength workout -> session/lap/set/exercise_title) that removes guesswork. It stops short of saying when to prefer this over sibling activity/FIT tools.

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

Deploy Server

Other Tools