Skip to main content
Glama

Placid MCP Server

errors.ts993 B
export class PlacidMcpError extends Error { constructor(message: string, public code?: number) { super(message); this.name = "PlacidMcpError"; } } export class ValidationError extends PlacidMcpError { constructor(message: string) { super(message); this.name = "ValidationError"; } } export class ApiError extends PlacidMcpError { constructor(message: string, code?: number) { super(message, code); this.name = "ApiError"; } } export function formatError(error: unknown): { type: "text"; text: string } { if (error instanceof PlacidMcpError) { return { type: "text", text: `${error.name}: ${error.message}`, }; } if (error instanceof Error) { return { type: "text", text: `Error: ${error.message}`, }; } return { type: "text", text: "An unknown error occurred", }; } export function createErrorResponse(error: unknown) { return { isError: true, content: [formatError(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/felores/placid-mcp-server'

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