Betterness
Bett-iDocsTutorialsAboutAugmented Wellness

Overview

Trust

Resources

System

Get Started

Clients

Recipes

Tools

Reference

DocsMCPRecipesUpload Lab Results

Upload Lab Results (MCP)

Upload a PDF, review extracted values, approve.

Two upload paths

ToolUse when
getLabResultFileUploadEndpoint()Preferred. Agent can make HTTP requests. Returns multipart upload URL + cURL example. Same API key as MCP.
getLabResultUploadLink()Fallback. Agent cannot make HTTP requests. Returns a platform link for manual user upload.

Step-by-step

  1. Call getLabResultFileUploadEndpoint() — returns uploadUrl, method, contentType, fileField, maxSizeMB, and a ready-to-use cURL example
  2. Upload the PDF: POST with multipart body, field name file, Authorization: Bearer bk_*
  3. Poll getUserLabRecords() for status — PENDING → PROCESSING → PROCESSED (usually seconds to minutes)
  4. Once PROCESSED: getLabRecordDetail(externalId) — review patient info, test details, biomarker array
  5. If anything looks wrong:
    • updateLabResultBiomarker — fix or delete an individual biomarker
    • updateLabResultMetadata — fix patient or test details
  6. updateLabResultStatus(externalId, "APPROVE") — biomarkers become visible in searchBiomarkers and biological age recalculates

If extraction was wrong

  • updateLabResultStatus(externalId, "REPROCESS") — re-runs PDF extraction
  • updateLabResultStatus(externalId, "ROLLBACK") — reverts APPROVED → PROCESSED (hides biomarkers)

Tips

  • Always show the extracted values to the user and get explicit approval before calling APPROVE
  • The cURL example in getLabResultFileUploadEndpoint is copy-paste ready — agents can render it for the user when MCP HTTP isn't available
Order LabsBiomarker Gap Analysis
© 2026 Betterness Inc.
Privacy PolicyTerms of ServiceHealth Data