get_prompt_stats
Analyze and retrieve statistics for available prompts to optimize development workflows, supporting tasks like UI/UX design, project setup, and debugging.
Instructions
Get statistics about available prompts
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:198-209 (handler)MCP tool handler for 'get_prompt_stats' in the CallToolRequestSchema. Delegates to PromptManager.getStats() and formats response 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 (handler)Core implementation of prompt statistics calculation in PromptManager.getStats(), returning total prompts, category count, and breakdown.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; }
- src/prompt-types.ts:23-27 (schema)TypeScript interface defining the output structure (PromptStats) for the get_prompt_stats tool.export interface PromptStats { totalPrompts: number; categories: number; categoryBreakdown: Record<string, number>; }