get_personal_bests
Retrieve a user's highest typing scores in specific modes, such as time, words, quote, or zen, through the MonkeyType MCP Server. Define parameters like mode and duration for precise results.
Instructions
Get user's personal best typing scores
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Mode for personal bests (time, words, quote, zen). Defaults to 'time' | |
| mode2 | No | Secondary mode parameter for time mode (e.g., 15, 30, 60, 120). Defaults to '15' |
Implementation Reference
- server.js:301-312 (handler)Handler for the 'get_personal_bests' tool. Constructs parameters with defaults for mode ('time') and mode2 ('15'), calls the MonkeyType API endpoint '/users/personalBests', and returns the JSON response.case "get_personal_bests": { // Add required mode parameter const params = { mode: args.mode || "time", // Default to time mode if not specified mode2: args.mode2 || "15" // Default to 15 seconds if not specified (confirmed from previous change) }; const result = await callMonkeyTypeApi('/users/personalBests', 'GET', apiKey, params); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }
- server.js:24-27 (schema)Zod schema for input validation of the 'get_personal_bests' tool, defining optional 'mode' and 'mode2' parameters.const GetPersonalBestsSchema = BaseApiSchema.extend({ mode: z.string().optional().describe("Mode for personal bests (time, words, quote, zen). Defaults to 'time'"), mode2: z.string().optional().describe("Secondary mode parameter for time mode (e.g., 15, 30, 60, 120). Defaults to '15'") });
- server.js:168-172 (registration)Tool registration in the ListTools response, specifying name, description, and input schema reference.{ name: "get_personal_bests", description: "Get user's personal best typing scores", inputSchema: zodToJsonSchema(GetPersonalBestsSchema), },