get_prompt_stats
Retrieve statistics about available development prompts to analyze usage patterns and optimize AI-powered workflows.
Instructions
Get statistics about available prompts
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:198-209 (handler)Handler for the 'get_prompt_stats' tool: retrieves statistics from PromptManager and returns them as JSON text content.case "get_prompt_stats": const promptStats = this.promptManager.getStats(); logger.info("Retrieved prompt statistics"); return { content: [ { type: "text", text: JSON.stringify(promptStats, null, 2), }, ], };
- src/prompt-manager.ts:252-266 (helper)The getStats() method in PromptManager that computes and returns prompt statistics: total prompts, number of categories, and breakdown by category.getStats(): PromptStats { const stats: PromptStats = { totalPrompts: this.prompts.size, categories: this.categories.size, categoryBreakdown: {}, }; for (const category of this.categories) { stats.categoryBreakdown[category] = Array.from( this.prompts.values() ).filter((prompt) => prompt.category === category).length; } return stats; }