Skip to main content
Glama

list_prompts

Browse and filter available prompts from promptz.dev to reduce context switching in development workflows.

Instructions

List available prompts from promptz.dev

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNoPagination token for fetching the next set of results
tagsNoFilter prompts by tags (e.g. ['CLI', 'JavaScript'])

Implementation Reference

  • The listPromptsToolHandler function that executes the 'list_prompts' tool: parses arguments, fetches prompts using searchPrompts from GraphQL client, maps results, and returns formatted JSON response.
    export async function listPromptsToolHandler(request: CallToolRequest): Promise<CallToolResult> { const nextToken = request.params.arguments?.nextToken as string | undefined; const tags = request.params.arguments?.tags as string[] | undefined; const response = await searchPrompts(nextToken, tags); const prompts = response.searchPrompts.results; const result = { prompts: prompts.map((prompt) => ({ name: prompt.name, description: prompt.description, tags: prompt.tags || [], author: prompt.author, })), nextCursor: response.searchPrompts.nextToken || undefined, }; return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
  • Input schema definition for the 'list_prompts' tool in the ListToolsRequestHandler response, specifying cursor and tags parameters.
    { name: "list_prompts", description: "List available prompts from promptz.dev", inputSchema: { type: "object", properties: { cursor: { type: "string", description: "Pagination token for fetching the next set of results", }, tags: { type: "array", items: { type: "string", }, description: "Filter prompts by tags (e.g. ['CLI', 'JavaScript'])", }, }, }, },
  • src/index.ts:108-110 (registration)
    Dispatch registration in the CallToolRequestHandler switch statement, routing 'list_prompts' calls to listPromptsToolHandler.
    case "list_prompts": { return await listPromptsToolHandler(request); }

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/cremich/promptz-mcp'

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