list_prompts
Browse available prompt templates by category to find reusable workflows for tasks like daily planning, code review, and document summarization.
Instructions
List all available prompt templates, optionally filtered by category
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Filter by category |
Implementation Reference
- src/prompts/prompts.ts:143-168 (handler)Handler function for the 'list_prompts' tool. Retrieves prompts from the registry (filtered by optional category), formats them into a JSON structure with count and details (id, name, description, category, param count, tags), and returns as text content.async (args) => { const prompts = registry.prompts.list(args.category as PromptCategory); return { content: [ { type: "text", text: JSON.stringify( { count: prompts.length, prompts: prompts.map((p) => ({ id: p.id, name: p.name, description: p.description, category: p.category, parameters: p.parameters.length, tags: p.tags, })), }, null, 2 ), }, ], }; }
- src/prompts/prompts.ts:137-142 (schema)Input schema for 'list_prompts' tool using Zod. Defines an optional 'category' parameter enum with predefined prompt categories.{ category: z .enum(["productivity", "code", "research", "communication", "general"]) .optional() .describe("Filter by category"), },
- src/prompts/prompts.ts:134-169 (registration)Registration of the 'list_prompts' MCP tool on the McpServer instance within registerPromptTools function.server.tool( "list_prompts", "List all available prompt templates, optionally filtered by category", { category: z .enum(["productivity", "code", "research", "communication", "general"]) .optional() .describe("Filter by category"), }, async (args) => { const prompts = registry.prompts.list(args.category as PromptCategory); return { content: [ { type: "text", text: JSON.stringify( { count: prompts.length, prompts: prompts.map((p) => ({ id: p.id, name: p.name, description: p.description, category: p.category, parameters: p.parameters.length, tags: p.tags, })), }, null, 2 ), }, ], }; } );