Skip to main content
Glama
KerkhofMe
by KerkhofMe

get_activity_streams

Retrieve detailed time-series data for Strava activities, including GPS coordinates, heart rate, power, cadence, altitude, and velocity metrics to analyze performance.

Instructions

Get detailed time-series data (streams) for an activity: GPS coordinates, heartrate, power, cadence, altitude, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activity_idYesThe Strava activity ID
stream_typesNoTypes of streams to retrieve

Implementation Reference

  • The implementation of the get_activity_streams tool, which fetches time-series data from Strava for a given activity ID.
    server.tool(
      "get_activity_streams",
      "Get detailed time-series data (streams) for an activity: GPS coordinates, heartrate, power, cadence, altitude, etc.",
      {
        activity_id: z.number().describe("The Strava activity ID"),
        stream_types: z
          .array(
            z.enum([
              "time",
              "distance",
              "latlng",
              "altitude",
              "velocity_smooth",
              "heartrate",
              "cadence",
              "watts",
              "temp",
              "moving",
              "grade_smooth",
            ])
          )
          .default(["time", "distance", "heartrate", "altitude", "velocity_smooth"])
          .describe("Types of streams to retrieve"),
      },
      async ({ activity_id, stream_types }) => {
        const keys = stream_types.join(",");
        const streams = await stravaFetch(
          `/activities/${activity_id}/streams?keys=${keys}&key_type=time`
        );
        return {
          content: [{ type: "text", text: JSON.stringify(streams, null, 2) }],
        };
      }
    );

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/KerkhofMe/StravaMCP'

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