media.get_presigned_url
Generates a direct presigned PUT upload URL ONLY for callers whose execution environment has direct outbound internet access to *.r2.cloudflarestorage.com (such as local terminals, Claude Code with network enabled, or Gemini CLI scripts). WARNING: Calling this tool ONLY reserves an upload endpoint—it does NOT upload any file, and sandboxed chats (ChatGPT, Claude.ai offline sandboxes) block outbound HTTP PUT requests. Inside sandboxed chats, NEVER call this tool—use 'media.upload' with 'file'/'files', 'download_url', or 'url', or ask the user to upload in HamroLink's Media Library UI and call 'media.list'. Never place the returned 'cdnUrl' into pages until an HTTP PUT actually succeeds.
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": "media.get_presigned_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | No | Destination folder (default: 'uploads') | |
| filename | Yes | Filename with extension (e.g. 'logo.png', 'team.webp') | |
| contentType | No | MIME type (e.g. 'image/png', 'image/jpeg', 'image/webp') |