get_personal_records
Retrieve your personal records including longest run, fastest 5K, 10K, half marathon, full marathon, and longest ride from Garmin Connect.
Instructions
Get personal records: longest run, fastest 5K/10K/half/full marathon, longest ride
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/performance.tools.ts:130-141 (handler)Tool registration for 'get_personal_records' with handler that calls client.getPersonalRecords() and returns the result as JSON text.
server.registerTool( 'get_personal_records', { description: 'Get personal records: longest run, fastest 5K/10K/half/full marathon, longest ride', }, async () => { const data = await client.getPersonalRecords(); return { content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }], }; }, ); - src/tools/performance.tools.ts:130-141 (registration)Registration of 'get_personal_records' tool on the MCP server via server.registerTool().
server.registerTool( 'get_personal_records', { description: 'Get personal records: longest run, fastest 5K/10K/half/full marathon, longest ride', }, async () => { const data = await client.getPersonalRecords(); return { content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }], }; }, ); - src/client/garmin.client.ts:435-437 (helper)Client method getPersonalRecords() that makes an HTTP request to the personal record endpoint.
async getPersonalRecords(): Promise<unknown> { return this.request(`${PERSONAL_RECORD_ENDPOINT}/${this.displayName}`); } - API endpoint constant for personal records: /personalrecord-service/personalrecord/prs
export const PERSONAL_RECORD_ENDPOINT = '/personalrecord-service/personalrecord/prs';