Skip to main content
Glama

AI Note MCP Server

by ainote-dev
formatters.js•742 B
export function toSuccessContent(payload, options = {}) { const { pretty = true } = options; const text = pretty ? JSON.stringify(payload, null, 2) : JSON.stringify(payload); return { content: [ { type: 'text', text } ] }; } export function toErrorContent(error) { const message = error?.message ?? String(error); const details = error?.response?.data; const textParts = [`Error: ${message}`]; if (details) { try { textParts.push(JSON.stringify(details, null, 2)); } catch (stringifyError) { textParts.push(String(details)); } } return { content: [ { type: 'text', text: textParts.join('\n') } ], isError: true }; }

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/ainote-dev/ainote-mcp'

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