list_prompts
Browse available prompt templates for productivity, code, research, communication, and general tasks, with optional category filtering.
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-169 (handler)The handler function for the 'list_prompts' MCP tool. It lists prompts from the registry (optionally filtered by category) and returns a JSON-formatted response.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)Zod input schema for the 'list_prompts' tool defining an optional 'category' parameter.{ category: z .enum(["productivity", "code", "research", "communication", "general"]) .optional() .describe("Filter by category"), },
- src/prompts/prompts.ts:134-169 (registration)MCP tool registration for 'list_prompts' via server.tool(), including name, description, input schema, and handler.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 ), }, ], }; } );
- src/core/prompt-manager.ts:200-206 (helper)Core 'list()' method in PromptManager that provides the prompt listing logic used by the tool handler, filtering by category if specified.list(category?: PromptCategory): PromptTemplate[] { const all = Array.from(this.templates.values()); if (category) { return all.filter((t) => t.category === category); } return all; }
- src/index.ts:71-71 (registration)Top-level call to registerPromptTools which includes the list_prompts tool registration.registerPromptTools(server);