list_prompt_categories
Explore available prompt categories and their prompt counts to understand the library structure before searching or creating prompts.
Instructions
π Overview: List all available prompt categories with prompt counts. Use this to explore the library structure and see what categories exist before searching or creating prompts. Great for discovering new areas.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/enhancedTools.ts:576-598 (handler)The main handler function for the 'list_prompt_categories' tool. Retrieves categories from cache, counts prompts per category, formats a markdown response with category names and counts, and returns it as MCP text content.private handleListCategories(): CallToolResult { const categories = this.cache.getCategories(); const categoryCounts: Record<string, number> = {}; // Count prompts per category for (const prompt of this.cache.getAllPrompts()) { const cat = prompt.metadata.category || 'uncategorized'; categoryCounts[cat] = (categoryCounts[cat] || 0) + 1; } const text = `# Prompt Categories\n\n${categories.map(cat => `- **${cat}** (${categoryCounts[cat] || 0} prompts)` ).join('\n')}\n\nTotal: ${categories.length} categories`; return { content: [ { type: 'text', text, } as TextContent, ], }; }
- src/enhancedTools.ts:117-125 (registration)Tool definition and registration in getToolDefinitions() method, including name, description, and empty input schema (no parameters required).{ name: 'list_prompt_categories', description: 'π Overview: List all available prompt categories with prompt counts. Use this to explore the library structure and see what categories exist before searching or creating prompts. Great for discovering new areas.', inputSchema: { type: 'object', properties: {}, description: 'No parameters needed. Returns all categories with prompt counts for easy browsing.', }, },
- src/enhancedTools.ts:270-271 (registration)Dispatch case in handleToolCall() switch statement that routes calls to the list_prompt_categories handler.case 'list_prompt_categories': return this.handleListCategories();