Skip to main content
Glama
convertPngDataToToolResult.ts368 B
import { CallToolResult } from '@modelcontextprotocol/sdk/types.js'; export function convertPngDataToToolResult(pngData: string): CallToolResult { const base64Data = Buffer.from(pngData).toString('base64'); return { isError: false, content: [ { type: 'image', data: base64Data, mimeType: 'image/png', }, ], }; }

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/datalabs89/tableau-mcp'

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