Skip to content

CLI Usage (Claude Code)

When using SaveHealth through Claude Code in the terminal, the experience is text-based. There are no interactive UI widgets. Each tool runs in sequence and results are displayed as formatted tables. You type your selections in plain language.

Interactive UI

SaveHealth also provides an interactive UI with visual widgets when used in Claude.ai or ChatGPT. See How It Works for details.


CLI vs Interactive UI

Interactive UI (Claude.ai, ChatGPT)CLI (Claude Code)
PresentationVisual widgets and cardsASCII text tables
SelectionClick options in the UIType your choice in plain language
Flow controlUI handles step transitionsTools run sequentially
RefinementUI controls for quantity/dosageType changes like "what about 90?"

Full Example: Lipitor Search to Coupon

A complete interaction: searching for Lipitor, comparing options, checking prices at different quantities, and getting a coupon.

Step 1: Search for the Drug

❯ can you please give me best lipitor prices

search_drug runs and finds the drug. If multiple matches are found, you are asked to pick one.

Step 2: View Drug Options

get_drug_options returns all available dosage strengths, forms, and quantities:

Generic (Atorvastatin)

#DosageFormDefault QtyAvailable Quantities
120mgTablet3030, 45, 60, 90, 180
210mgTablet3015, 30, 45, 60, 90, 180
340mgTablet3030, 45, 60, 90, 180
480mgTablet3015, 30, 45, 60, 90, 180

Brand (Lipitor)

#DosageFormDefault QtyAvailable Quantities
510mgTablet306, 15, 30, 31, 45, 60, 90
620mgTablet305, 6, 15, 30, 45, 60, 90
740mgTablet306, 30, 45, 60, 90
880mgTablet306, 10, 15, 30, 45, 60, 90

Which option and quantity would you like to see prices for? (e.g., "option 1, 30 tablets")

Generic options are always listed first since they are the cheaper alternative.

Step 3: Compare Prices

Select an option by typing:

❯ I actually want lipitor 40mg

get_drug_prices returns prices for Brand Lipitor 40mg, 30 tablets:

#PharmacyPrice
1Albertsons$557.00
2Walmart$603.44
3Walgreens$613.49
4CVS$614.85

The best price is $557.00 at Albertsons. Would you like me to get a coupon for any of these pharmacies?

Changing the quantity mid-conversation

You can adjust the quantity without starting over:

❯ what if I wanted the version with 90

Updated prices for 90 tablets:

#PharmacyPrice
1Albertsons$1,656.00
2Walgreens$1,779.19
3CVS$1,803.94
4Walmart$1,848.29

Best price is again $1,656.00 at Albertsons. That works out to ~$18.40/tablet vs ~$18.57/tablet with the 30-count, so a slight per-unit savings.

Step 4: Get Your Coupon

Select a pharmacy:

❯ nice. I prefer to buy at CVS

get_coupon returns the discount card:

FieldValue
Price$1,803.94
BIN015995
PCNGDC
Group IDDR33
Member IDLHKTJ412283

Present these details at the CVS pharmacy counter. Save or screenshot this for reference!


Refining Mid-Conversation

You can adjust any selection without restarting:

  • Change quantity: "what about 90 tablets?" or "show me the 60-count price"
  • Switch pharmacy: "actually, get me the CVS coupon" or "I prefer Walgreens"
  • Change dosage: "what about the 20mg version?" or "show me 80mg instead"
  • Switch to generic: "what's the generic price for this?" or "show me Atorvastatin instead"

The conversation context is preserved and only the necessary tools re-run.


Tips

  • NDC shortcut: if you have the NDC from your prescription bottle, provide it directly to skip search and options. Example: "NDC 29300039710, Amlodipine 5mg, qty 30, prices and coupon?"
  • Generics first: generic alternatives are always listed before brand-name drugs
  • Price sorting: pharmacy prices are always listed cheapest first
  • Per-unit comparison: ask for per-unit cost comparison across quantities to find the best value

Setup

To add SaveHealth to Claude Code, run:

claude mcp add savehealth --transport http https://mcp-agentcore.labhack-public.tools/mcp

See Setup for full installation instructions.

Powered by SaveHealth