Skip to main content
Glama
plainly-videos

Plainly Videos MCP Server

toolResponse.ts798 B
import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; export const toToolResponse = (output: { [key: string]: unknown }, isError = false): CallToolResult => { try { const outputString = JSON.stringify(output); return { content: [ { type: "text", text: outputString, }, ], structuredContent: output, isError, }; } catch { return { content: [], structuredContent: output, isError, }; } }; export const normalizeError = (err: unknown): { message: string; details?: unknown } => { if (err instanceof Error) { return { message: err.message, details: err.stack ?? err, }; } return { message: "An unknown error occurred", details: err, }; };

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/plainly-videos/mcp-server'

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