Add a file to a fax
add_fax_filePuts a PDF from the person’s own disk on their XipFax draft. A photo of any kind, such as a JPEG, PNG, HEIC, WebP, GIF or AVIF, goes as a PDF made from it first on their computer, upright as a photo viewer shows it: on a Mac, sips -Z 2100 -s format pdf <photo> --out <name>.pdf makes one, upright and at most 2,100 pixels on its long side. Any other kind of file, such as a Word file, goes once saved as a PDF. Work out the PDF’s size in bytes and its SHA-256 first, with a command such as shasum -a 256 <file>, and give both. The answer is an address good for 15 minutes and the headers to send with the file: PUT the file’s exact bytes there with each of those headers, such as with curl --upload-file <file> -H "<name>: <value>" "<address>", then call finish_fax_file. The address takes this file alone. PDFs only, 40 MB at most.
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": {
"name": "<name>",
"size_bytes": "<size_bytes>",
"sha256": "<sha256>"
},
"name": "add_fax_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Its name, such as its file’s: 255 characters at most. | |
| sha256 | Yes | Its SHA-256 in hex, 64 characters, as `shasum -a 256 <file>` prints it. | |
| size_bytes | Yes | Its size in bytes: a PDF of 40 MB at most. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| upload | Yes | Where the file goes: a PUT of its exact bytes to `url`, with each of these `headers`, within 15 minutes. It takes this one file and no other. | |
| document | Yes |