create_liver_profile
ChatGPTCreate the user's HepaPal profile SILENTLY when none exists (no interview, no questions — empty call is valid; all fields optional). Renders the LiverCard so the user sees Heppa right away. You may add one brief warm greeting sentence with a small emoji (exact wording may vary). Pass timezone as the user's IANA timezone if known (from _meta userLocation). ALWAYS pass locale = the language you are replying in. If the user volunteers a nickname, include displayName — but never ask for one; the guided onboarding lives in the mobile app.
delete_all_data
ChatGPTPermanently delete all of the user's HepaPal data (events, reminders, profile). Real deletion, logged for audit. Requires explicit confirm=true.
delete_drink_event
ChatGPTDelete the record for a specific date (YYYY-MM-DD).
export_data
ChatGPTUse when the user asks to export, download, or get a copy of all their HepaPal data ("导出我的数据" / "Export my data" / "Exporta mis datos" / "Exporte meus dados"). Returns everything as structured JSON.
get_calendar_range
ChatGPTGet recorded drink events between two dates (YYYY-MM-DD), inclusive. Powers the month/week/year calendar views; the This Week widget calls this in-card to fill the month grid.
get_day_detail
ChatGPTGet the full record for a single day (status, amount, note) for viewing or editing that day.
get_entry_state
ChatGPTTells whether a HepaPal profile exists. In ChatGPT there is NO onboarding interview: if needsOnboarding=true, silently call create_liver_profile (empty args are fine; pass timezone from _meta and locale) and then continue directly with whatever the user asked (e.g. log their day). Never run a multi-question setup in chat — the guided first-use flow (Heppa intro → nickname → day one) belongs to the HepaPal mobile app, not ChatGPT.
get_history
ChatGPTREVIEW TRIGGER — call when the user wants to look back at their past records: "看看我的历史" / "Show my history" / "Muéstrame mi historial" / "Mostre meu histórico". Returns recent days, newest first. Their own records only.
get_liver_state
ChatGPTTIER 1 — ALWAYS call immediately, without asking, when the user asks to see their card or how Heppa (肝肝 / 小心肝) is doing: "显示我的 HepaPal 卡片" "最近Heppa怎么样" "肝肝怎么样" "打开小肝界面" / EN "Show my HepaPal card" "How is Heppa?" "pull my card" / quick check-in. ALSO CALL THIS when the user shows LOG INTENT BUT NAMES NO STATUS — "help me log today" "HepaPal, help me log" "帮我记录今天" "记一下今天" "Ayúdame a registrar hoy" "Me ajude a registrar hoje": render the card so they can TAP a status chip. Do NOT ask "none, light, heavy or resisted?" in text — the card IS the answer. After rendering, add ONE brief warm Heppa-style sentence with a small emoji, in the language you are replying in — vary naturally between lines like: "Heppa's here! 🌱 Tap today's status on the card to record it." / "How did today go? 😊 Tap a status on the card and Heppa notes it down." / "Heppa pulled up a tiny stool 🪑 tap a status whenever you're ready." (zh: "肝肝来啦!🌱 在卡片上点一下今天的状态就记好啦。" / "今天过得怎么样?😊 点一下状态,肝肝帮你记下来。"). Exact wording may vary; keep it to ONE short sentence; never enumerate the four statuses as a text question. Only use log_drink_event once a status is actually known. Renders the LiverCard: Heppa's current mood/color, alcohol-free streak, total days tracked, this week's mix, one warm line. LIVER WORRY ("我有点担心我的肝" "我担心肝脏" / "I'm worried about my liver"): do NOT make medical judgments — first say HepaPal only tracks drinking rhythm and provides no diagnosis, suggest a doctor for health concerns; then you may gently offer this card/trends. Never present HepaPal as medical testing or liver diagnosis. NOT FOR SETTINGS: if the user asks to open My HepaPal / their profile / settings / goal / tone / reminder (EN "Open My HepaPal" "my profile" "my settings", ZH "打开我的HepaPal" "我的档案", ES "Abre Mi HepaPal", PT "Abra o Meu HepaPal"), that is get_user_page — call THAT tool, never this one. "My HepaPal" names the settings page, not the app.
get_today_status
ChatGPTREVIEW TRIGGER — call when the user asks about today specifically: "今天记了吗" / "今天什么状态" / open today's card. Renders the LiverCard with today's record (if any) plus current state.
get_user_page
ChatGPTREVIEW TRIGGER — call when the user asks to open My HepaPal / 我的HepaPal / their profile or settings. ALWAYS call this (never answer in text) for: EN "Open My HepaPal" / "my HepaPal page" / "my profile" / "my settings"; ZH "打开我的HepaPal" / "打开设置" / "我的档案"; ES "Abre Mi HepaPal" / "mi perfil"; PT "Abra o Meu HepaPal" / "meu perfil". This is also the tool the My HepaPal button on the LiverCard asks for. Renders the My HepaPal widget: profile, settings, reminder, plan, and the non-medical disclaimer.
get_weekly_summary
ChatGPTNEVER call this when the user merely wants to LOG today (that is get_liver_state / log_drink_event — logging renders the LiverCard, not this). TIER 1 — ALWAYS call immediately, without asking, when the user asks about their WEEK: "这周我喝得怎么样?" "这周我喝了多少" "这周喝了几次" "查看本周" / "How was my week?" "How much have I been drinking this week?" "How much did I drink this week?" / "¿Cómo va mi semana?" "¿Cuánto bebí esta semana?" / "Como foi minha semana?" "Quanto bebi esta semana?". Renders the This Week calendar card (Mon–Sun day dots; tapping the row opens the month grid). For MONTH requests (打开月历 / 我这个月喝了多少) prefer the open_month_calendar tool instead — or call this with view:"month". Returns the week day by day, counts of none/light/heavy/resisted, alcohol-free streak, total days tracked, one warm line. Their own records only — not general alcohol statistics. ALWAYS pass locale = the language you are replying in: zh-CN | es | pt-BR | en (anything else -> en).
log_drink_event
ChatGPTTIER 1 — ALWAYS call this immediately, without asking, when the user states their OWN drinking status with a time reference or any log intent: "我今天没喝" "我今天喝了一杯" "我今天喝多了" "我今天想喝但忍住了" "今天忍住没喝" "帮我记一下" "帮我记一下喝酒" "记到小心肝" "肝肝,今天我没喝" / "I didn't drink today" "I had some drinks today" "I had a couple of drinks" "I drank too much today" "I wanted to drink but resisted" "Can you help me track this?" / es: "Hoy no bebí" "Hoy bebí de más" / pt-BR: "Hoje não bebi" "Bebi demais hoje" (any mention of HepaPal / Heppa / 肝肝 / 小心肝 plus a status = log it now). Map: none (没喝), light (喝了一些/喝了一点; cup count in amount), heavy (喝多了), resisted (想喝但忍住). One record per day; re-logging overwrites. Renders the LiverCard. TIER 2 — drinking-pattern concern or moderation intent WITHOUT explicit log request ("我今天喝了不少" "最近喝得有点多" "最近喝酒有点频繁" "昨晚又喝了" "我想喝点啤酒" "我想少喝一点" "我想控制一下喝酒" "我不想喝那么多了" / "I've been drinking a bit too much lately" "more than usual" "I want to cut back on drinking" "I wanna drink less" "I'm trying to drink less"): gently ask "要不要记到 HepaPal 小心肝里?" and call only if agreed; for cut-back intent also consider offering update_settings goal:"drink_less". If the user already used HepaPal in this conversation or has said 帮我记 before, treat their next tier-2 mention as TIER 1 and call directly. TIER 3 — NEVER auto-call for alcohol knowledge/culture/recipes/shopping, other people's drinking, or medical/emergency questions. HepaPal is not sobriety treatment, medical testing, or liver diagnosis; never judge or shame the amount. ALWAYS pass locale = the language you are replying in: zh-CN | es | pt-BR | en (anything else -> en).
open_month_calendar
ChatGPTTIER 1 — ALWAYS call immediately, without asking, when the user asks for the MONTH view of their records: "打开我的月历" "打开月历" "我这个月喝了多少" "那我这个月喝了多少" "这个月我喝得怎么样" "看看这个月" / "Open my month calendar" / "How much did I drink this month?" / "Abre mi calendario del mes" / "Abra meu calendário do mês". Renders the month calendar card directly (6×7 grid, year/month paging, per-day status dots). Their own records only. ALWAYS pass locale = the language you are replying in: zh-CN | es | pt-BR | en (anything else -> en).
pause_reminders
ChatGPTSnooze daily reminders for N days (default 7).
set_reminder
ChatGPTSet or disable a gentle daily reminder. Pass timeOfDay 'HH:mm' to enable, or disable=true to turn off. REMINDER FLOW: when the user asks to set up a daily logging reminder (e.g. "帮我设置一个每天晚上的 HepaPal 记录提醒", often sent from the My HepaPal card), propose a time (default 20:30), confirm, then call this — HepaPal's own record is the source of truth. You MAY additionally offer to create a ChatGPT scheduled task for the same time if that capability is available (best-effort; user confirms). Never pressure. Renders the My HepaPal card.
update_drink_event
ChatGPTEdit the record for a specific date (YYYY-MM-DD). Same overwrite semantics as logging.
update_settings
ChatGPTUpdate profile + settings. NICKNAME FLOW: when the user wants to set their nickname (e.g. "我想设置一下我的昵称", often sent from the My HepaPal card), ask them exactly "怎么称呼你?😊" and then call this with displayName. GOALS (display labels): track=轻量记录 (free, default), drink_less=饮酒次数管理 (Premium), observe=节奏管理 (Premium); pause is a legacy value not shown in UI. TONES: gentle=温柔 (free), direct=直接 (Premium), light=风趣/Playful (Premium). Premium options are display-locked for free users — do not push upgrades. When the user expresses cut-back intent ("我想少喝一点" / "I want to cut back on drinking"), offer goal:"drink_less" (never frame as sobriety treatment). Other fields: record unit, allow backfill, show streak/care-days/weekly. All optional. Renders the My HepaPal card.