export function toMcpSuccess(message: string, structuredContent: Record<string, unknown>) {
  return {
    content: [{ type: "text" as const, text: message }],
    structuredContent,
    isError: false
  };
}

export function toMcpError(code: string, detail: string) {
  const warning = { code, message_code: code, severity: "error" as const };
  return {
    content: [{ type: "text" as const, text: `${code}: ${detail}` }],
    structuredContent: {
      ok: false,
      error_code: code,
      message_code: code,
      detail,
      warnings: [warning]
    },
    isError: true
  };
}
