Upload attached file
ingestAttachmentSend a file the person attached in this chat to Tofu as an app’s code: file is the attachment as the chat passes it, by link; Tofu downloads it only from the chat’s own file store, at most 10 MB. The attachment is the whole app: a ZIP is the app’s folder, any other file its one file, at path (else index.html for an HTML file, or its own name). Send name to make a new app, or projectId to replace all the code of an app this account owns (a repository-linked app’s current source too) with this attachment — a file not in it is not in the new version. A ZIP with an unsafe path or a private file anywhere in it (a .env, a key) is refused with a sentence and nothing is stored. The same name with the same file again within ten minutes answers with the app already made (reused: true) and makes no second one. summary is one plain line on what this code changes, never a secret.
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": "ingestAttachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| name | No | ||
| path | No | ||
| summary | No | ||
| projectId | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| bytes | Yes | ||
| files | Yes | ||
| reused | No | ||
| sha256 | Yes | ||
| received | Yes | ||
| projectId | Yes | ||
| latestDeployment | No |