Skip to main content
Glama

import_activity

Upload a local .fit, .gpx, or .tcx file to Garmin Connect as an activity; duplicate uploads return an error.

Instructions

Imports a .fit, .gpx or .tcx file as an activity. A duplicate raises GarminConnectionError. Multipart upload to /upload-service/upload/{ext} (extension from filename, must be fit/gpx/tcx) with the load-bearing NK/origin/custom User-Agent headers that make Garmin treat it as an import rather than a device sync; a 409 is re-raised as GarminConnectionError ("Activity already exists (duplicate):...").

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": {
      "filePath": "<filePath>"
    },
    "name": "import_activity"
  }
}

Input Schema

NameRequiredDescriptionDefault
filePathYesAbsolute path to a local .fit, .gpx or .tcx file (~ is expanded)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and openWorldHint=true, but the description goes further by disclosing failure semantics: a duplicate raises GarminConnectionError and a 409 is re-raised as 'Activity already exists (duplicate)'. This is valuable error-handling context beyond the annotations.

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 second sentence is bloated with implementation detail (endpoint path, NK/origin/User-Agent headers) that does not help an agent decide or invoke correctly.

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

Completeness3/5

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

For a single-param mutation with no output schema, the definition still omits what a successful import returns (an activity id? the created object?), leaving the agent unable to chain follow-up calls. Auth/account prerequisites are also only hinted at via header jargon.

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

Parameters3/5

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

Schema coverage is 100% and the single filePath param is already documented as an absolute path with ~ expansion. The description adds only that the extension is derived from filename and must be fit/gpx/tcx, which duplicates the schema's format list rather than extending it.

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+resource ('Imports a .fit/.gpx/.tcx file as an activity') and names the accepted input formats. It does not, however, distinguish itself from the sibling 'upload_activity', which an agent will likely confuse it with.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance, no prerequisites, and no mention of the near-identical sibling 'upload_activity' or 'create_manual_activity'. The agent must infer when to prefer this over those alternatives.

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