Skip to main content
Glama

Frame0 MCP Server

by niklauslee
response.ts1.26 kB
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; // Standard JSON-RPC Error Codes export enum JsonRpcErrorCode { ParseError = -32700, InvalidRequest = -32600, MethodNotFound = -32601, InvalidParams = -32602, InternalError = -32603, // -32000 to -32099 are reserved for implementation-defined server-errors. ServerError = -32000, } export interface JsonRpcError { code: number; // JsonRpcErrorCode or a custom server error code message: string; data?: unknown; } type MimeType = "image/png" | "image/jpeg" | "image/webp" | "image/svg+xml"; export function text(text: string): CallToolResult { return { content: [ { type: "text", text, }, ], }; } export function error(code: number, message: string, data?: unknown): CallToolResult { return { isError: true, error: { code, message, data, } as JsonRpcError, content: [ { type: "text", // Provide a textual representation of the error in content text: message, } ] }; } export function image(mimeType: MimeType, data: string): CallToolResult { return { content: [ { type: "image", data, mimeType, }, ], }; }

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/niklauslee/frame0-mcp-server'

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