Create file upload
create_file_uploadUpload a local file for a tool's file input or a build's file question. Returns the file's id, a one-time upload_url and its transfer_key: send the file's bytes there once with an HTTP PUT and the transfer key in a Pomerado-Transfer-Key header, with the curl command the result gives, such as curl -T receipt.pdf -H 'Pomerado-Transfer-Key: <transfer_key>' '<upload_url>', then pass id as the file field's value or the question's answer. The file must be at most 25 MiB unless the deployment says otherwise, its first bytes must match media_type, and executables are refused. Send the bytes within 15 minutes; three refused uploads close the upload_url, so create a new upload then. A file serves one run, is erased when that run's job ends, and is erased an hour after its upload if unused. A file field also takes an https URL or a data: URI of at most 512 KB instead.
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>",
"media_type": "<media_type>"
},
"name": "create_file_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The file's name, as the website will see it, for example receipt.pdf | |
| size | No | The file's size in bytes; if given, the upload's Content-Length must match | |
| intent | No | Describe the intended use case in one sentence: what this call should do and why, such as "Check a store's opening hours to answer when it opens today". Describe the task, not the person: leave out names, contact details, account numbers and anything used to sign in. Pomerado uses it to improve its tools. Optional, but recommended: please include it on every call. | |
| sha256 | No | The file's SHA-256 as 64 hex characters, in either case; if given, an upload of other bytes is refused with file_digest_mismatch and stores nothing | |
| media_type | Yes | The file's media type, such as application/pdf; its first bytes must match it |