Prepare a local photo upload to TriFit
prepare_trifit_uploadFor a user-selected local file in Codex, with explicit permission: create a private, one-use upload URL valid for at most five minutes. PUT only that JPEG/PNG/WebP file as raw bytes, with its image Content-Type, no API/OAuth headers and no redirects. Do not print or share the URL. The PUT saves/resizes the image in the connected account library and selects its website photo/product slot; product images use cached description preparation. Preserve clientImportId and the returned assetId. Never retry an uncertain upload automatically. Preparing does not upload or generate.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"clientImportId": "<clientImportId>",
"role": "<role>",
"permissionConfirmed": "<permissionConfirmed>"
},
"name": "prepare_trifit_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | Yes | ||
| clientImportId | Yes | Stable UUID for this user-approved import. Never replace after an uncertain upload. | |
| permissionConfirmed | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | Yes | ||
| method | Yes | ||
| maxBytes | Yes | ||
| expiresAt | Yes | ||
| uploadUrl | Yes | ||
| environment | Yes | ||
| clientImportId | Yes |