get_prompt_categories
Retrieve available prompt categories to organize and access reusable templates for tasks like daily planning, code review, and document summarization.
Instructions
Get all available prompt categories
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/prompts/prompts.ts:315-333 (handler)Inline handler function implementing the get_prompt_categories tool. Retrieves prompt categories from the registry and returns them in a JSON-formatted MCP response.server.tool("get_prompt_categories", "Get all available prompt categories", {}, async () => { const categories = registry.prompts.getCategories(); return { content: [ { type: "text", text: JSON.stringify( { categories, count: categories.length, }, null, 2 ), }, ], }; });
- src/prompts/prompts.ts:315-333 (registration)Registration of the get_prompt_categories tool via server.tool(), with no input schema and inline handler.server.tool("get_prompt_categories", "Get all available prompt categories", {}, async () => { const categories = registry.prompts.getCategories(); return { content: [ { type: "text", text: JSON.stringify( { categories, count: categories.length, }, null, 2 ), }, ], }; });
- src/core/prompt-manager.ts:312-318 (helper)Helper method getCategories() in the PromptManager class (accessed as registry.prompts) that computes and returns the unique set of prompt categories from registered templates.getCategories(): PromptCategory[] { const categories = new Set<PromptCategory>(); for (const template of this.templates.values()) { categories.add(template.category); } return Array.from(categories); }