upload_attachment
Upload local files to the POS as File documents, optionally attach to records and set privacy for WooCommerce product photo sideloading.
Instructions
Upload a LOCAL file to the POS as a File document, optionally attached to a document (doctype + name) and/or set into its Attach field (fieldname). Returns the File doc incl. file_url. Default is_private=true — product photos that WooCommerce must sideload need is_private=false. For bulk photo+gallery imports prefer the firearm-listing-import script (it resizes images first; oversized originals break the Woo push).
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": {
"file_path": "<file_path>"
},
"name": "upload_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| doctype | No | ||
| fieldname | No | ||
| file_path | Yes | ||
| is_private | No |