# DietBox — how to use (mcp.ai)

Gestão de pacientes, prescrições, antropometria, agenda, chat e diário alimentar para nutricionistas.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_dietbox?ms=1781045160000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `dietbox_agenda_list`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/dietbox`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/dietbox/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/dietbox/agenda/list` — Read schedule/agenda in Dietbox.
  - body: { start?: string, end?: string, timezone?: number, patient_id?: string, account?: string, patient_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/agenda/summary` — Read schedule/agenda in Dietbox.
  - body: { start?: string, end?: string, timezone?: number, patient_id?: string, account?: string, patient_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/agenda/write` — Create a new event/appointment in the Dietbox agenda.
  - body: { patient_id?: string, titulo?: string, tipo?: string, start: string, end: string, timezone?: string, descricao?: string, todo_dia?: boolean, account?: string, patient_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/anamnese/delete` — Remove uma anamnese do Dietbox. Ação irreversível.
  - body: { anamnesis_id: string, patient_id?: string, account?: string, anamnesis_ids?: string[], patient_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/anamnese/get` — Read anamnesis (health history questionnaire) records in Dietbox.
  - body: { patient_id?: string, anamnesis_id?: string, skip?: number, take?: number, search?: string, account?: string, patient_ids?: string[], anamnesis_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/anamnese/get/latest` — Read anamnesis (health history questionnaire) records in Dietbox.
  - body: { patient_id?: string, anamnesis_id?: string, skip?: number, take?: number, search?: string, account?: string, patient_ids?: string[], anamnesis_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/anamnese/list` — Read anamnesis (health history questionnaire) records in Dietbox.
  - body: { patient_id?: string, anamnesis_id?: string, skip?: number, take?: number, search?: string, account?: string, patient_ids?: string[], anamnesis_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/anamnese/write/create` — Create or update an anamnesis (health history questionnaire) in Dietbox.
  - body: { patient_id?: string, anamnesis_id?: string, descricao?: string, texto_livre?: string, tipo?: number, data?: string, overrides?: object, account?: string, patient_ids?: string[], anamnesis_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/anamnese/write/update` — Create or update an anamnesis (health history questionnaire) in Dietbox.
  - body: { patient_id?: string, anamnesis_id?: string, descricao?: string, texto_livre?: string, tipo?: number, data?: string, overrides?: object, account?: string, patient_ids?: string[], anamnesis_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/antropometria/delete` — Delete an anthropometric evaluation from Dietbox. This is irreversible.
  - body: { anthropometry_id: string, account?: string, anthropometry_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/antropometria/get` — Read anthropometric evaluations in Dietbox (weight, height, BMI, body composition).
  - body: { patient_id?: string, anthropometry_id?: string, skip?: number, take?: number, tipo?: number, account?: string, patient_ids?: string[], anthropometry_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/antropometria/get/latest` — Read anthropometric evaluations in Dietbox (weight, height, BMI, body composition).
  - body: { patient_id?: string, anthropometry_id?: string, skip?: number, take?: number, tipo?: number, account?: string, patient_ids?: string[], anthropometry_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/antropometria/list` — Read anthropometric evaluations in Dietbox (weight, height, BMI, body composition).
  - body: { patient_id?: string, anthropometry_id?: string, skip?: number, take?: number, tipo?: number, account?: string, patient_ids?: string[], anthropometry_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/antropometria/write` — Create a new anthropometric evaluation in Dietbox.
  - body: { patient_id: string, weight: number, height: number, type?: number, description?: string, date?: string, account?: string, patient_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/chat/list` — Read chat conversations in Dietbox.
  - body: { patient_id?: string, unread?: boolean, take?: number, account?: string, patient_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/chat/messages` — Read chat conversations in Dietbox.
  - body: { patient_id?: string, unread?: boolean, take?: number, account?: string, patient_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/chat/write` — Send a chat message to a patient in Dietbox. Pass message data as a JSON string.
  - body: { data: string, account?: string }
- `POST https://api.mcp.ai/api/dietbox/get/goal/progress` — Get goal progress for a Dietbox patient: completion percentages, streaks, recent activity.
  - body: { patient_id: string, timezone?: number, account?: string, patient_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/get/nutritionist` — Get the nutritionist's professional profile in Dietbox: CRN, specialties, signature, subscription details.
  - body: { account?: string }
- `POST https://api.mcp.ai/api/dietbox/get/profile` — Get the nutritionist's Dietbox profile (perfil): name, email, subscription plan, features.
  - body: { account?: string }
- `POST https://api.mcp.ai/api/dietbox/list/accounts` — List all Dietbox accounts linked to this install.
  - body: { account?: string }
- `POST https://api.mcp.ai/api/dietbox/list/diario` — List food diary entries for a Dietbox patient on a specific date. Shows what the patient ate, meal photos, comments.
  - body: { patient_id: string, date: string, skip?: number, take?: number, account?: string, patient_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/list/finance/transactions` — List financial transactions in Dietbox: payments, receivables, filtered by date and status.
  - body: { start_date?: string, end_date?: string, paid?: boolean, category?: string, account?: string }
- `POST https://api.mcp.ai/api/dietbox/list/goals` — List nutrition/health goals for a Dietbox patient: weight targets, habit goals, custom objectives.
  - body: { patient_id: string, skip?: number, take?: number, account?: string, patient_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/meal/plan` — Get the active meal plan (plano alimentar) for a patient in Dietbox.
  - body: { patient_id: string, account?: string, patient_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/patient/delete` — Permanently delete a patient from Dietbox. Irreversible.
  - body: { patient_id: string, account?: string, patient_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/patient/get` — Read patients in Dietbox.
  - body: { patient_id?: string, search?: string, skip?: number, take?: number, is_active?: boolean, order?: string, account?: string, patient_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/patient/list` — Read patients in Dietbox.
  - body: { patient_id?: string, search?: string, skip?: number, take?: number, is_active?: boolean, order?: string, account?: string, patient_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/patient/write/create` — Create or update patients in Dietbox.
  - body: { patient_id?: string, Name?: string, Email?: string, Phone?: string, MobilePhone?: string, Birthday?: string, Gender?: string, Cpf?: string, Observation?: string, IsActive?: boolean, account?: string, patient_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/patient/write/update` — Create or update patients in Dietbox.
  - body: { patient_id?: string, Name?: string, Email?: string, Phone?: string, MobilePhone?: string, Birthday?: string, Gender?: string, Cpf?: string, Observation?: string, IsActive?: boolean, account?: string, patient_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/prescription/get` — Read supplement/herbal medicine prescriptions in Dietbox (NOT meal plans — use dietbox_meal_plan for food plans).
  - body: { patient_id?: string, prescription_id?: string, skip?: number, take?: number, search?: string, account?: string, patient_ids?: string[], prescription_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/prescription/list` — Read supplement/herbal medicine prescriptions in Dietbox (NOT meal plans — use dietbox_meal_plan for food plans).
  - body: { patient_id?: string, prescription_id?: string, skip?: number, take?: number, search?: string, account?: string, patient_ids?: string[], prescription_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/prescription/list/models` — Read supplement/herbal medicine prescriptions in Dietbox (NOT meal plans — use dietbox_meal_plan for food plans).
  - body: { patient_id?: string, prescription_id?: string, skip?: number, take?: number, search?: string, account?: string, patient_ids?: string[], prescription_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/prescription/write` — Create a new supplement/herbal medicine prescription in Dietbox. For meal plans, use dietbox_meal_plan (read-only — Dietbox não expõe escrita via API).
  - body: { title: string, patient_id: string, data?: string, account?: string, patient_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/prontuario` — Get the clinical record (prontuario) for a Dietbox patient: medical history, notes.
  - body: { patient_id: string, account?: string, patient_ids?: string[] }
- `POST https://api.mcp.ai/api/dietbox/prontuario/write` — Update the clinical record (prontuario) for a Dietbox patient. Pass the text content directly (HTML supported). Returns 204 on success.
  - body: { patient_id: string, text: string, account?: string, patient_ids?: string[] }

## Example prompts
- "Mostre minha agenda de hoje e os pacientes confirmados"
- "Crie uma anamnese pra novo paciente João Silva"
- "Resuma o financeiro do mês e transações pendentes"

## More
- Page: https://mcp.ai/dietbox
- Agent spec (llms.txt): https://mcp.ai/dietbox/llms.txt
- Postman collection: https://mcp.ai/dietbox/postman.json
