Send a piece to StyleTwin
add_to_closetSend a piece to the user's StyleTwin closet: a shop's product page (shop_link) and/or one picture of it (image, image_url or image_base64), with what it is (piece) and the product's details (product). Use this when the user wants a piece from this chat in StyleTwin, one they own or one they like in a shop. The app adds it the next time the user opens StyleTwin, or shows it at the top of the Closet tab for them to add. Needs Allow changes for this chat in the app.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "add_to_closet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | What it is, for the user, e.g. "Linen shirt from Zara, size M". | |
| image | No | A photo the user attached in this chat, as taken: their own photo of the piece, or a photo of them in it (ChatGPT fills it in). StyleTwin cuts the piece out on the phone. | |
| piece | No | What the piece is. With a picture, the app adds it by itself. | |
| product | No | What you know about the product on shop_link, kept with the piece. | |
| image_url | No | A direct https link to the shop's own product photo (as the shop shows it) or to the user's photo. An unedited picture: StyleTwin cuts the piece out itself. JPEG, PNG or WebP. | |
| shop_link | No | A shop's product page. Send it with image_url (the product photo) when you have it. | |
| image_base64 | No | A small unedited picture inline: 768 px JPEG, quality 80, under 500 KB. |