Skip to main content
Glama
lumile

Promptopia MCP

by lumile

list_prompts

Browse and discover available prompts in Promptopia MCP to find suitable templates for your AI interactions.

Instructions

Lists all available prompts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler execution for the 'list_prompts' tool: fetches prompts from service and returns them as JSON text content.
    case 'list_prompts': { const prompts = await this.promptsService.listPrompts() return { content: [{ type: 'text', text: JSON.stringify({ prompts }, null, 2) }] } }
  • Registration of the 'list_prompts' tool in the tools list returned by listTools() method.
    { name: 'list_prompts', description: 'Lists all available prompts', inputSchema: { type: 'object', properties: {} } },
  • Core implementation of listing prompts by reading JSON files from the prompts directory.
    async listPrompts(): Promise<Prompt[]> { try { const files = await this.fileSystemService.listFiles(this.promptsDir, '.json') const prompts: Prompt[] = [] for (const file of files) { try { const filePath = path.join(this.promptsDir, file) const prompt = await this.fileSystemService.readJSONFile<Prompt>(filePath) prompts.push(prompt) } catch (error) { console.error(`Error reading prompt file ${file}:`, error) // Continue with other files even if one fails } } return prompts } catch (error) { console.error('Failed to list prompts:', error) throw error } }

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/lumile/promptopia-mcp'

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