Skip to main content
Glama

Import workouts from other systems (Garmin, Strava, GPX/TCX/FIT files) to local files

import_workouts

Load .fit, .gpx, or .tcx workout files exported from Garmin, Strava, Apple, or other trackers into a separate local store, with duplicate checks and per-file refusal reasons.

Instructions

Imports workouts exported from OTHER systems (a Garmin Connect export, a Strava bulk export, GPX files from an Apple Watch app or any other tracker) into a local store of their own, /.suunto-mcp/imported/ (SUUNTO_IMPORT_DIR moves it), apart from the Suunto archive (which stays exactly what Suunto sent). path is an ABSOLUTE path to one .fit, .gpx or .tcx file or to a folder: only the files directly in that folder are read (no subfolders, no links, no hidden files, no .gz or .zip: unpack those first; other file types are ignored and counted). This server cannot read macOS's protected folders (/Downloads, ~/Desktop, ~/Documents): ask the user to copy the files to e.g. /tmp/workouts first. Per workout it stores the file byte for byte as .<fit|gpx|tcx> and .json (version, source, format, SHA-256, size, importedAt and a summary { startTime (UTC), durationS, distanceM, avgHr?, maxHr?, ascentM?, sport?, hasGps }); id is the first 16 hex digits of the SHA-256; the record is written last and is the mark 'imported' (files are 0600, a folder the tool creates 0700, each file written complete under a temporary name and linked into place, which fails if the name exists). source ('garmin', 'strava', 'apple' or 'other', default 'other') is only a label kept in the record. Nothing is ever overwritten or deleted. The same file again is skipped (alreadyImported); a DIFFERENT file whose workout starts within 60 s of a stored one and lasts within 5 % of it (the same activity from two systems) is NOT imported and is listed in possibleDuplicate. A file that is not what its extension says, is truncated, or fails the checks (timestamps valid and not in the future, positions on the globe, GPS jumps faster than 12 m/s dropped (30 for cycling and for files that name no sport; the number dropped is summary.droppedJumps), at least 2 GPS points for a GPX track, files over 50 MB refused without being read) is listed in refused with the reason and nothing is written for it. A record or file already in the folder that is damaged, foreign or of a newer version is never changed: a file that matches it is refused. A call reads at most 200 files (new, already imported and refused all count) and imports at most limit new workouts (1-50, default 50); remaining says how many files were not looked at yet and nextAfter is the name of the last file looked at: CALL AGAIN with after set to it until remaining is 0 (a refused file leaves nothing behind, so without after the same files would be read again). Each of alreadyImported, possibleDuplicate, refused and errors lists its first 50 entries only; alreadyImportedCount, possibleDuplicateCount, refusedCount and errorsCount hold the totals. It reads only the given files and writes only in the imports folder: it never contacts Suunto or any network and needs no Suunto credentials. Output: { dir, source, found, examined, newlyImported, imported: [{ file, id, format, source, summary }], alreadyImported: [{ file, id }], alreadyImportedCount, possibleDuplicate: [{ file, sameAs, startTime }], possibleDuplicateCount, refused: [{ file, reason }], refusedCount, errors: [{ file, error }] (a file that could not be saved), errorsCount, ignored: { otherTypes, subfolders, links, hidden, gzipped }, remaining, nextAfter, notes }. estimate_route_time also uses an imported workout, but ONLY if its sport is walking, hiking or running (and it carries altitude, distance and time): the sport is read from a FIT file's session, a GPX file's first track , or a TCX file's Sport attribute, and TCX knows only Running, Biking and Other, so TCX walks and hikes do not count; a GPX file without a does not count (Apple Watch route GPX files are likely untyped; unverified), and notes says how many imported workouts name no sport. Only the first session of a FIT file is read (multi-sport files are summarised by their first session). Sleep, HRV and recovery data are deliberately NOT imported, and Apple Health's export.xml is not supported (GPX routes from it work). The parsers have been verified on synthetic files only. In demo mode the store is in memory and nothing is written to disk (the files are still read from path).

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": {
      "path": "<path>"
    },
    "name": "import_workouts"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path to one .fit, .gpx or .tcx file or to a folder holding them (not recursive).
afterNoOnly files whose name sorts after this one are looked at: pass the previous call's nextAfter to continue a folder of more than 200 files.
limitNoMost new workouts to import in this call (default and maximum 50).
sourceNoLabel for where the files come from, kept in each record (default 'other').other

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.3.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare a non-destructive write with no open-world access; the description goes far beyond that with atomic write semantics, 0600/0700 permissions, dedup by SHA-256 and by 60s/5% similarity, refusal reasons, the 200-file-per-call scan cap, 50-entry list truncation with separate totals, in-memory demo mode, and the guarantee that nothing is overwritten, deleted or sent over the network. It also discloses a real limitation ('parsers verified on synthetic files only') that no annotation carries.

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?

It is front-loaded on the core purpose and the most agent-critical warning (protected folders) appears early, but it is a dense wall of text with many sentences carrying several unrelated facts (file validation rules, sport-name derivation, TCX limitations, demo mode). A large part of the content is load-bearing, yet it would benefit from structure or bullet grouping rather than one run-on block.

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?

There is no output schema, so the description carries the full burden and does so: it enumerates every result field (dir, found, examined, newlyImported, imported, alreadyImported, possibleDuplicate, refused, errors, ignored, remaining, nextAfter, notes) with the meaning of the count-versus-list relationship. For a tool with this much validation, pagination and edge-case surface, nothing an agent needs to call it correctly is missing.

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 the baseline is 3, but the description adds meaning the schema lacks: `source` is 'only a label kept in the record', `after` exists because refused files leave nothing behind and would otherwise be re-read, and `limit` counts new workouts while the 200-file scan cap counts examined files separately. The distinction between limit and the scan cap is genuinely new information.

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 description states a specific verb and resource (import workout files from other systems) and immediately positions it against the Suunto archive: imported files land in ~/.suunto-mcp/imported/ and the archive 'stays exactly what Suunto sent'. An agent can tell this apart from get_workout_fit, list_workouts and archive_workouts without opening a schema.

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 gives explicit preconditions (absolute path, single .fit/.gpx/.tcx file or a non-recursive folder, unpack .gz/.zip first, copy out of macOS-protected folders to /tmp), an explicit continuation protocol ('CALL AGAIN with `after` set to it until remaining is 0'), and a named downstream consumer with its sport restrictions (estimate_route_time only for walking/hiking/running). It also states exclusions (sleep, HRV, recovery, Apple Health export.xml).

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