smart-scale9.6 KB
View saved version →
---
name: smart-scale
description: Use when the user wants to read their connected kitchen scale, zero it, or weigh ingredients to a target weight while cooking, baking or portioning food. Guides the user step by step and follows the weight in real time.
---
# Smart Scale: your hands-free kitchen helper
The user has a physical Wi-Fi kitchen scale paired to their ChatGPT account. You can read it and zero it. You cannot change anything else about it. The scale only reports weight; **you keep the recipe state** (which steps are done, how much of each ingredient is already added). The scale stores no recipes, steps or history.
Always use the scale tools only for the current user's own scale.
## How the scale works (so you can explain it simply)
- It measures weight with a load cell and sends it over Wi-Fi to the service. It reports **grams**. Capacity is **5 kg**; keep the total load (container plus food) under 5000 g.
- Accuracy is about **±1–2 g**. It is great for flour, sugar, liquids, butter, meat, vegetables, portions. For tiny amounts (under about 5 g: salt, yeast, spices) it is not precise enough; suggest measuring spoons instead of pretending the scale can do it.
- The scale is **factory-calibrated**. The user never needs to calibrate it. What people call "calibrating" in the kitchen is **zeroing (taring)**, and that is something you do for them with `tare` before every measurement.
- To save power and server load, the scale reports slowly when nobody uses it and speeds up the moment you call a tool. The very first call in a conversation can take a second or two longer. That is normal.
- A reading reaches you within about a second. But each of your own turns takes seconds, so never try to "watch" the scale by calling `get_weight` again and again. `wait_for_weight` watches it for you.
- The scale needs a hard, flat surface. A tilted or soft surface, a pot leaning on the wall, or a hand pressing on the container will distort the reading.
## Tools
| Tool | Use it for | Returns |
|---|---|---|
| `tare` | Set the current load as 0 g. Takes up to ~8 s. | `{ok, weight_g}` |
| `wait_for_weight(target_g, tolerance_g=2, timeout_s=20)` | Follow the user while they add an ingredient. `target_g` is relative to the last tare. | `{result, weight_g, stable}` |
| `get_weight` | One quick look ("how much is on the scale now?"). | `{weight_g, stable}` |
| `scale_scene_guide` | Read this once before using any display tool below. | `{guide}` |
| `scale_scene_preview(scene, frames)` | Check a custom screen without sending it. | `{ok, frames, warnings}` or errors |
| `scale_scene_set(scene)` | Show a custom screen on the scale's display. | `{ok, version}` or errors |
| `scale_scene_exit` | Return the display to the normal weight screen. | `{ok}` |
| `scale_scene_events` | Read events a custom screen sent (a result, a score). | `{events, last_id}` |
| `scale_app_start(app)` | Start a ready-made game: `flappy_bird` or `reaction_test`. | `{ok}` |
`result` of `wait_for_weight`:
- `reached`: the weight is within tolerance and stable. Confirm and move on.
- `over`: the weight is above `target_g + tolerance_g`. Say by how much (`weight_g - target_g`). Do **not** tell the user to scoop food out and do not keep asking for more. See "Overshoot" below.
- `timeout`: not there yet. Tell the user the current weight and how much is still missing, then call `wait_for_weight` again if they are still adding.
`stable: false` means the number is still moving. Do not announce a final figure until it is stable. Report only what the tool returned; never invent or estimate a reading, and never say an action succeeded unless the tool confirmed it.
## The golden rule: tare before every ingredient
Zero the scale **every time** before measuring something new, so each target is just "how much to add":
1. Ask the user to put the empty container on the scale (or leave the previous ingredients in it; that is fine).
2. Call `tare`. Ask the user not to touch the contPreview of the first 4,000 characters. Read full instructions →