Save attached files
fs_importSave files from this chat into the project: the user's attachments (their photos for the site), or an image your app's image generation made in this chat. For an image you made, always pass generated: true (anything you created, not a file the user attached); leave it out only for the user's own files. Give files: the attachments or images, as your app passes them (ChatGPT fills in each one's download_url and file_id); never for web addresses. They go into data/import (path: another folder under data/), which isn't served, never over a file already there (a second cake.jpg becomes cake-2.jpg), and are recorded as the user's own (with generated: true, as made from a prompt). Images (HEIC too), PDFs, documents, video and other files of up to 50 MB each, 20 files and 200 MB a call; programs, scripts, HTML pages and SVGs with scripts are refused. Returns each saved file's path, size and, for an image, its real width and height; then images view (paths: ["data/import"]) to see which is which, and images place to put each into its slot. Called without files (your app doesn't pass attachments), it returns the portal's upload link to give the user.
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": {
"project": "<project>"
},
"name": "fs_import"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | The folder under data/ to save into (default "data/import", not served). | |
| files | No | The files the user attached, up to 20. Left out when your app doesn't pass attachments: the answer is then the upload link. | |
| project | Yes | Project slug or id. | |
| generated | No | true for an image your app's image generation made (anything you created, not a file the user attached): recorded as made from a prompt, never as the user's own work, place or people. Leave it out only for the user's own files. Saved one without it? Call fs_import again with the same file and generated: true: the record is corrected, nothing is saved twice. | |
| idempotency_key | No | Any unique string; repeating a call with the same key does not repeat its effect. |