list_enhanced_achievements
Retrieve available achievements and categories for coding milestones, with optional filtering by achievement type like streaks, multi-kills, or team events.
Instructions
📋 List all available enhanced achievements and their categories. Returns achievement names, categories, and thresholds. Useful for discovering available achievements or filtering by category type.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | 🎯 Filter achievements by category. Options: 'streak' (kill streak achievements like RAMPAGE, DOMINATING), 'quality' (quality-based achievements like EXCELLENT, PERFECT), 'multi' (multi-kill achievements like WICKED SICK, HEADSHOT), 'game' (game state announcements like FIRST BLOOD, HUMILIATION), 'team' (team events like PREPARE TO FIGHT, PLAY). If omitted, returns all achievements. Examples: 'streak', 'multi' |
Implementation Reference
- index.js:773-805 (handler)The core handler function for the 'list_enhanced_achievements' tool. It extracts optional category filter, filters and sorts achievements from ENHANCED_ACHIEVEMENTS, and returns a structured list with success status, message, achievements array, and total count.async listEnhancedAchievements(args) { const { category } = args; let achievements = Object.entries(ENHANCED_ACHIEVEMENTS); if (category) { achievements = achievements.filter(([_, info]) => info.category === category); } const sortedAchievements = achievements.sort((a, b) => { // Sort by category first, then by threshold if (a[1].category !== b[1].category) { return a[1].category.localeCompare(b[1].category); } return a[1].threshold - b[1].threshold; }); const list = sortedAchievements.map(([name, info]) => ({ name: name, file: info.file, category: info.category, threshold: info.threshold })); return { success: true, message: category ? `📋 Found ${list.length} enhanced ${category} achievements!` : `📋 Found all ${list.length} enhanced achievements!`, achievements: list, total: list.length }; }
- index.js:360-373 (schema)The JSON schema definition for the 'list_enhanced_achievements' tool, including name, description, and input schema with optional 'category' enum filter.{ name: "list_enhanced_achievements", description: "📋 List all available enhanced achievements with detailed info", inputSchema: { type: "object", properties: { category: { type: "string", description: "🎯 Filter by category (streak, quality, multi, game, team, powerup)", enum: ["streak", "quality", "multi", "game", "team", "powerup"], }, }, }, },
- index.js:232-233 (registration)Registration/dispatch in the CallToolRequestSchema handler switch statement, routing calls to the listEnhancedAchievements method.case "list_enhanced_achievements": return await this.listEnhancedAchievements(args);
- src/tools/achievements.ts:125-162 (registration)Alternative registration of the tool using server.registerTool, including schema (using Zod) and inline handler function that lists achievements similarly.server.registerTool( "list_enhanced_achievements", { description: "📋 List all available enhanced achievements and their categories. Returns achievement names, categories, and thresholds. Useful for discovering available achievements or filtering by category type.", inputSchema: { category: z.enum(["streak", "quality", "multi", "game", "team"]).optional().describe("🎯 Filter achievements by category. Options: 'streak' (kill streak achievements like RAMPAGE, DOMINATING), 'quality' (quality-based achievements like EXCELLENT, PERFECT), 'multi' (multi-kill achievements like WICKED SICK, HEADSHOT), 'game' (game state announcements like FIRST BLOOD, HUMILIATION), 'team' (team events like PREPARE TO FIGHT, PLAY). If omitted, returns all achievements. Examples: 'streak', 'multi'"), }, annotations: { title: "📋 List Achievements", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false } }, async ({ category }) => { const achievements = category ? Object.entries(ENHANCED_ACHIEVEMENTS).filter(([_, info]) => info.category === category) : Object.entries(ENHANCED_ACHIEVEMENTS); const achievementList = achievements.map(([name, info]) => `🏆 ${name} (${info.category}, threshold: ${info.threshold})` ).join('\n'); return { content: [{ type: "text", text: `📋 Available achievements:\n${achievementList}` }], achievements: achievements.map(([name, info]) => ({ name, ...info })), total: achievements.length, category }; } );