Add to the user's equipment
add_my_equipmentAdds- What it does
- Adds a new record and leaves what you had alone. Safe to retry: the same call twice changes nothing more.
- Permission
- Profile, change
profile:write
What your assistant is told
Record that the user has one piece of equipment somewhere they train. Pass EITHER equipment (a slug from list_equipment) or customName (what they call it, when the vocabulary has no row for it) — never both.
**Confirm with the user before adding.** Name the thing you matched and wait for a yes: a machine identified from a photo is a guess, and this writes to their profile. One call per piece of equipment.
place picks where: a place's name, or "home" / "gym". A name we don't know yet creates that place (placeKind says which sort, defaulting to a gym). Omit place entirely and it goes to their first place — or, if they have none, to one we create from their training context.
Adding something they already have at that place changes nothing and returns the existing row (alreadyThere), so it is safe to retry. Use remove_my_equipment to undo. This does NOT create a custom exercise — that is create_custom_exercise.
Parameters
equipmenttext, optionalVocabulary slug fromlist_equipment, e.g. "leg-press". Omit when passingcustomName.customNametext, optionalWhat the user calls it, when the vocabulary has no row — e.g. "the old blue pec deck". At most 120 characters. Omit when passingequipment.placetext, optionalWhere they have it: a place's name ("World Class Unirii"), or "home" / "gym". Omit for their first place.placeKindtext, optionalOnly used whenplacenames a place we don't know yet: "home" or "gym". Defaults to "gym".idempotencyKeyid, optionalOptional UUID you generate for THIS write, so retrying it is safe. Pass the SAME key when you retry a call that timed out or errored with an unclear outcome: the server returns the record the first attempt created instead of writing a second one. Generate a fresh key per distinct write — reusing one is how you'd silently skip a second, genuinely new entry. Omit it and every call writes a new record.