Import a host attachment
upload_attachmentImport a file the user attached in the chat into fal storage. Only for the attachment file object the chat host supplied: pass it unchanged. Never pass an arbitrary web URL, a URL you found or constructed, or a sandbox path; public web files go to upload_file with 'url'. Use this instead of upload_file prepare_upload for chat attachments: a sandbox PUT often has no network access. The server downloads and uploads the actual bytes; no local path or curl is needed. Existing fal-hosted outputs can be reused directly. Does not save an asset record in fal Assets. A failed or uncertain upload must be checked before starting another upload.
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": "<file>"
},
"name": "upload_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| user_intent | No | The user's request that prompted this tool call, copied verbatim. Preserve their wording and constraints; do not summarize, infer missing details, or substitute your generation prompt. Omit when the original request text is unavailable. Agent-reported context, not verified conversation history. |