# Import external file

Tool: `veryfront__import_external_file`

Import external file. Requires project.uploads.write.

## Arguments

| Name                | Type                                    | Required | Description                                                                                                                                                                                                                                                                            |
| ------------------- | --------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `project_reference` | string                                  |          | Project ID or slug. Requires project.uploads.write and destination upload edit permission; quota and plan limits apply. Uses the caller's own personal provider connection.                                                                                                            |
| `provider`          | string                                  | Yes      | Storage provider accessed through the caller's own personal connection. A shared project connection is not used. One of `onedrive`, `sharepoint`, `drive`.                                                                                                                             |
| `file_id`           | string · min length 1 · max length 1024 | Yes      | File ID from list\_external\_files                                                                                                                                                                                                                                                     |
| `base_path`         | string                                  |          | Older name for folder\_path. Destination folder path prefix in project object storage (e.g., "my-docs" → "my-docs/{filename}"). Defaults to "external-imports/{timestamp}\_{filename}".                                                                                                |
| `folder_path`       | string · min length 1                   |          | Destination folder inside project Uploads, relative (no leading "/"). Defaults to "external-imports" with a timestamped name.                                                                                                                                                          |
| `timestamp_prefix`  | boolean                                 |          | Prefix the stored name with a timestamp. Defaults to true when no folder is given, false otherwise.                                                                                                                                                                                    |
| `visibility`        | string                                  |          | Visibility of the new upload: "project", "public" or "private". Omitted, the upload inherits the destination folder's visibility. Setting it needs upload admin access on the destination, and "public" a paid plan; a refusal imports nothing. One of `project`, `public`, `private`. |
| `idempotency_key`   | string · min length 1 · max length 128  |          | Optional key of 1-128 characters without whitespace. Retrying with the same key and arguments within 24 hours returns the first result instead of creating another item; the same key with different arguments is refused.                                                             |

## 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__import_external_file",
    "arguments": {
      "provider": "onedrive",
      "file_id": "string"
    }
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"message\":\"string\",\"upload\":{\"id\":\"string\",\"project_id\":\"string\",\"path\":\"string\",\"name\":\"string\",\"mime_type\":\"string\",\"size_bytes\":0,\"visibility\":\"project\"},\"source\":{\"provider\":\"onedrive\",\"file_id\":\"string\"}}"
      }
    ],
    "structuredContent": {
      "message": "string",
      "upload": {
        "id": "string",
        "project_id": "string",
        "path": "string",
        "name": "string",
        "mime_type": "string",
        "size_bytes": 0,
        "visibility": "project"
      },
      "source": {
        "provider": "onedrive",
        "file_id": "string"
      }
    }
  }
}
```
