Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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 ), }, ], }; });
  • 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 ), }, ], }; });
  • 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); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ishuru/open-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server