export type McpContentPart = { type?: string; text?: string } & Record; export const formatContent = (content: Array | undefined) => { if (!content || content.length === 0) return "(empty)"; const parts = content.map((item) => { if (item.type === "text") return item.text ?? ""; return JSON.stringify(item); }); const result = parts.join("\n").trim(); return result.length ? result : "(empty)"; };