Skip to main content
Glama

export_workout_gpx

Export a workout's GPS route as GPX 1.1 XML with lat, lon, elevation, and timestamps. Directly import to Strava, Komoot, or Google Earth.

Instructions

Returns the workout's GPS route as a GPX 1.1 XML string (not JSON). Each trackpoint contains lat, lon, elevation, and timestamp. Suitable for direct import into Strava, Komoot, Google Earth, or any GPX-compatible tool. Returns a valid but empty GPX document if the workout has no GPS data. Use get_workout_samples for numeric time-series (HR, power, cadence) instead of GPS. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workoutKeyYesOpaque server-assigned string returned by list_workouts. Not guessable or constructable — always discover via list_workouts first. Passing an invalid key throws SuuntoNotFoundError.

Implementation Reference

  • MCP tool handler for export_workout_gpx: calls suunto.getWorkoutGpx and returns the GPX XML string.
    case "export_workout_gpx": {
      const bytes = await suunto.getWorkoutGpx(a.workoutKey);
      return text(new TextDecoder().decode(bytes));
    }
  • Schema/tool definition for export_workout_gpx: name, description, and inputSchema requiring workoutKey.
    {
      name: "export_workout_gpx",
      description:
        "Returns the workout's GPS route as a GPX 1.1 XML string (not JSON). Each trackpoint contains lat, lon, elevation, and timestamp. Suitable for direct import into Strava, Komoot, Google Earth, or any GPX-compatible tool. Returns a valid but empty GPX document if the workout has no GPS data. Use get_workout_samples for numeric time-series (HR, power, cadence) instead of GPS. Read-only.",
      inputSchema: {
        type: "object",
        properties: {
          workoutKey: {
            type: "string",
            minLength: 1,
            description: "Opaque server-assigned string returned by list_workouts. Not guessable or constructable — always discover via list_workouts first. Passing an invalid key throws SuuntoNotFoundError.",
          },
        },
        required: ["workoutKey"],
      },
    },
  • src/index.ts:306-306 (registration)
    Registration: the tool definition is part of the 'tools' array registered via ListToolsRequestSchema handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools }));
  • API client method that calls the Suunto cloud API endpoint /v2/workout/exportGpx to fetch the GPX data as a Buffer.
    getWorkoutGpx(workoutKey: string) {
      return this.bytes(`/v2/workout/exportGpx/${encodeURIComponent(workoutKey)}`);
    }
  • CLI handler for export-workout-gpx command: parses workoutKey from args and outputs GPX to stdout.
    case "export-workout-gpx": {
      const key = rest[0] ?? die("Usage: export-workout-gpx <workoutKey>");
      const bytes = await suunto.getWorkoutGpx(key);
      process.stdout.write(new TextDecoder().decode(bytes) + "\n");
      break;
    }
Behavior4/5

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

Despite no annotations, the description discloses key behaviors: returns GPX XML with specific trackpoint fields, returns empty GPX if no GPS data, and is read-only. It could mention authentication or rate limits, but the main behavioral traits are covered.

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

Conciseness5/5

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

The description is concise with six sentences, each serving a purpose. It front-loads the core behavior, includes use cases, edge cases, and sibling differentiation, with no redundant or extraneous text.

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?

Given no output schema, the description explains the return format (GPX XML with trackpoints), covers the edge case (empty GPX for no data), flags read-only behavior, and distinguishes from siblings. It is fully complete for a simple 1-parameter tool.

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?

The input schema has 100% coverage with a detailed description for workoutKey. The tool description does not add further semantics beyond the schema, so it meets the baseline expectation without additional value.

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 clearly states the action ('Returns the workout's GPS route'), the resource ('workout's GPS route'), and the format ('GPX 1.1 XML string (not JSON)'). It also distinguishes itself from sibling tools like get_workout_samples.

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?

The description provides explicit usage guidance: 'Use get_workout_samples for numeric time-series (HR, power, cadence) instead of GPS.' It also mentions suitability for import into Strava, Komoot, etc., and handles the edge case of no GPS data, informing when the tool can be used.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/googlarz/suunto-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server