Get an upload URL
threadpacket_upload_urlPrepare an attachment slot and return a single-use upload URL, valid 15 minutes, for a file on the user's machine (for example from Codex or a terminal). Upload the file's raw bytes with HTTP PUT to upload_url, sending the returned headers, then pass the attachment_id to threadpacket_send. First check that upload_url starts with https://threadpacket.com/v1/uploads/. From a shell, use this fixed command with the file's full path, the content type and the URL each in single quotes: curl -fsS -X PUT --upload-file '<full path>' -H 'content-type: <type>' '<upload_url>' (macOS, Linux; write a ' inside quotes as '''), or $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -UseBasicParsing -Method Put -InFile '<full path>' -ContentType '<type>' -Uri '<upload_url>' (Windows PowerShell; double each ' ‘ ’ ‚ ‛ inside quotes). Never send file contents through this tool. In Claude, if the upload fails with "CONNECT tunnel failed, response 403", Claude blocked it before it reached this server: ask the user to add threadpacket.com to Claude's allowed domains in Settings > Capabilities (on Team and Enterprise plans an owner does this in Admin settings), then upload again. If they cannot, they upload the file at https://threadpacket.com/packets and you attach it by name with attachment_names.
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": {
"filename": "<filename>"
},
"name": "threadpacket_upload_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | The file's name, without folders, as it is on disk. | |
| mime_type | No | The file's type if known, for example application/pdf or application/vnd.openxmlformats-officedocument.wordprocessingml.document. Any file type is accepted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | Yes | ||
| headers | Yes | ||
| max_bytes | Yes | ||
| expires_at | Yes | ||
| upload_url | Yes | ||
| attachment_id | Yes |