Skip to main content
Glama

Dropbox MCP Server

prompt-handler.ts873 B
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; import { promptDefinitions, getPromptWithArgs } from './prompt-definitions.js'; export const handleListPrompts = async () => { return { prompts: promptDefinitions.map(prompt => ({ name: prompt.name, description: prompt.description, arguments: prompt.arguments })) }; }; export const handleGetPrompt = async (request: any) => { const { name, arguments: args } = request.params; try { const prompt = getPromptWithArgs(name, args); if (!prompt) { throw new McpError( ErrorCode.InvalidParams, `Prompt not found: ${name}` ); } return prompt; } catch (error) { if (error instanceof Error) { throw new McpError( ErrorCode.InvalidParams, error.message ); } throw error; } };

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/Albiemark/dbx-mcp-server'

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