Skip to main content
Glama
routes.ts1.39 kB
import { z } from 'zod'; import { StravaClient } from '../strava-client.js'; export function createRouteTools(client: StravaClient) { return { get_routes: { description: 'Get athlete routes', inputSchema: z.object({ athlete_id: z.number().describe('Athlete ID'), page: z.number().optional().describe('Page number (default: 1)'), per_page: z.number().optional().describe('Number of items per page (default: 30)'), }), handler: async (args: { athlete_id: number; page?: number; per_page?: number; }) => { const routes = await client.getRoutes( args.athlete_id, args.page, args.per_page ); return { content: [ { type: 'text' as const, text: JSON.stringify(routes, null, 2), }, ], }; }, }, get_route: { description: 'Get detailed information about a specific route', inputSchema: z.object({ id: z.number().describe('Route ID'), }), handler: async (args: { id: number }) => { const route = await client.getRoute(args.id); return { content: [ { type: 'text' as const, text: JSON.stringify(route, 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/gcoombe/strava-mcp'

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