# Create upload from url

Tool: `veryfront__create_upload_from_url`

Download a file from an HTTP(S) URL on the server and store it as a project upload. Requires project.uploads.write.

## Arguments

| Name                  | Type                    | Required | Description                                                                                            |
| --------------------- | ----------------------- | -------- | ------------------------------------------------------------------------------------------------------ |
| `url`                 | string · uri            | Yes      | HTTP(S) URL to download. Private and internal addresses are refused; at most 5 redirects are followed. |
| `path`                | string                  | Yes      | Project-relative destination path, for example attachments/invoice.pdf. Do not URL-encode it.          |
| `headers`             | object                  |          | Request headers for the download, for example Authorization. Hop-by-hop headers are rejected.          |
| `content_type`        | string · min length 1   |          | MIME type override. Defaults to the response Content-Type, else application/octet-stream.              |
| `expected_size_bytes` | integer                 |          | Exact size in bytes the download must have; a different size fails the import.                         |
| `max_bytes`           | integer · max 536870912 |          | Largest download accepted, in bytes. Defaults to 104857600 and is capped at 536870912.                 |
| `project_reference`   | string                  |          | Project UUID, slug or configured domain; optional when the selected context supplies a project.        |

## Responses

| Status | Description                                           |
| ------ | ----------------------------------------------------- |
| 200    | The tool ran; its output is result.structuredContent. |

## Call it

```bash
curl -X POST -N "https://api.veryfront.com/mcp" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "veryfront__create_upload_from_url",
    "arguments": {
      "url": "https://example.com",
      "path": "string"
    }
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"id\":\"string\",\"path\":\"string\",\"file_name\":\"string\",\"content_type\":\"string\",\"size_bytes\":0,\"url\":\"string\",\"status\":\"pending\",\"visibility\":\"project\",\"created_at\":\"string\",\"updated_at\":\"string\",\"deleted_at\":\"string\"}"
      }
    ],
    "structuredContent": {
      "id": "string",
      "path": "string",
      "file_name": "string",
      "content_type": "string",
      "size_bytes": 0,
      "url": "string",
      "status": "pending",
      "visibility": "project",
      "created_at": "string",
      "updated_at": "string",
      "deleted_at": "string"
    }
  }
}
```
