Skip to main content
Glama

download_activity_file

Destructive

Download a Garmin activity and save it to disk as a FIT, GPX, TCX, or CSV file, with optional output directory selection.

Instructions

Download an activity and save it to disk as a file.

    Saves the activity in the requested format. Defaults to the original .fit
    file; Garmin also supports gpx, tcx, and csv.

    Directory resolution (first match wins):
      1. output_dir argument (one-off; not persisted)
      2. GARMIN_FIT_DOWNLOAD_DIR environment variable
      3. persisted config (set via set_fit_download_dir)
    If none is configured, returns status "needs_setup" with a suggested
    default (the server's current working directory). In that case, ask the
    user where to save, call set_fit_download_dir(path), then call this tool
    again.

    Files are named "{activity_id}.{ext}" and overwrite any existing file.

    Args:
        activity_id: Garmin activity ID
        format: One of fit, gpx, tcx, csv (default fit)
        output_dir: Optional one-off directory override (not persisted)
    

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": "download_activity_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNofit
output_dirNo
activity_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and openWorldHint=true; the description earns credit by explaining exactly what gets destroyed — files are named "{activity_id}.{ext}" and overwrite any existing file. It also discloses the needs_setup failure path and that output_dir is a one-off, non-persisted override, which the annotations cannot convey.

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-loads the action in the first sentence, then uses a compact numbered list for directory resolution and a short Args block. Some redundancy exists between the opening sentence and "Saves the activity in the requested format," and the docstring indentation adds visual noise.

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

Completeness4/5

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

For a three-parameter write tool with no output schema, the definition covers format options, filename convention, overwrite behavior, config resolution, and the needs_setup branch. The only gap is the shape of a successful response (e.g., final path or bytes written), which an agent must discover at call time.

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?

With 0% schema description coverage, the description carries the full burden and documents all three parameters, including that format must be one of fit/gpx/tcx/csv (default fit) and that activity_id accepts a Garmin activity ID. It does not clarify the accepted type flexibility (integer or string) declared in the schema, and output_dir semantics merge somewhat with the directory-resolution list.

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?

Uses a specific verb and resource: "Download an activity and save it to disk as a file," which separates it from read-only getters like get_activity_fit_data by signaling a disk write. It does not explicitly name a sibling tool it competes with, so an agent must infer the boundary from the 'save to disk' phrasing.

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?

Gives an explicit first-match-wins resolution order (argument, env var, persisted config) and a concrete recovery procedure when none is configured: report needs_setup, ask the user, call set_fit_download_dir(path), retry. It names the alternative tool and the exact condition that selects it, so no inference is required.

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