Skip to main content
Glama

Letta MCP Server

by oculairmedia
list-prompts.js2.53 kB
import { promptRegistry } from '../../handlers/prompts.js'; /** * Tool handler for listing available prompts */ export async function handleListPrompts(server) { try { const prompts = Array.from(promptRegistry.values()).map((p) => ({ name: p.name, title: p.title || p.name, description: p.description, arguments: p.arguments || [], })); return { content: [ { type: 'text', text: JSON.stringify( { total_prompts: prompts.length, prompts, }, null, 2, ), }, ], structuredContent: { total_prompts: prompts.length, prompts, }, }; } catch (error) { return server.createErrorResponse(error, 'Failed to list prompts'); } } /** * Tool definition for list_prompts */ export const listPromptsToolDefinition = { name: 'list_prompts', description: 'List all available prompt templates including wizards and workflows', inputSchema: { type: 'object', properties: {}, }, outputSchema: { type: 'object', properties: { total_prompts: { type: 'integer', description: 'Total number of available prompts', }, prompts: { type: 'array', items: { type: 'object', properties: { name: { type: 'string' }, title: { type: 'string' }, description: { type: 'string' }, arguments: { type: 'array', items: { type: 'object', properties: { name: { type: 'string' }, title: { type: 'string' }, description: { type: 'string' }, required: { type: 'boolean' }, }, }, }, }, }, }, }, required: ['total_prompts', 'prompts'], }, };

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/oculairmedia/Letta-MCP-server'

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