Skip to content

Commit ace6666

Browse files
Pranesh-Raghuravibits
authored andcommitted
add box_file_download, box_file_representations_get, box_file_upload to connector docs
1 parent 839aa01 commit ace6666

1 file changed

Lines changed: 52 additions & 2 deletions

File tree

  • src/content/docs/reference/agent-connectors

src/content/docs/reference/agent-connectors/box.mdx

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ Enable the corresponding Box app scopes before calling tools that need them:
6666

6767
| Tools | Required scope |
6868
|-------|---------------|
69-
| All file/folder read tools | `root_readonly` |
70-
| File/folder create, update, delete | `root_readwrite` |
69+
| All file/folder read tools, `box_file_download`, `box_file_representations_get` | `root_readonly` |
70+
| File/folder create, update, delete, `box_file_upload` | `root_readwrite` |
7171
| `box_group_*`, `box_user_memberships_list` | `manage_groups` |
7272
| `box_webhook_*`, `box_webhooks_list` | `manage_webhook` |
7373
| `box_user_create`, `box_user_delete`, `box_users_list`, `box_user_update` | `manage_managed_users` |
@@ -135,6 +135,56 @@ Retrieves a thumbnail image for a file.
135135
| `min_width` | integer | No | Minimum width of the thumbnail in pixels. |
136136
| `min_height` | integer | No | Minimum height of the thumbnail in pixels. |
137137

138+
## `box_file_download`
139+
140+
Initiates a file download from Box. Returns HTTP 200 or 302 on success. Binary file content is not returned in the tool response (`data=None`); use the Scalekit SDK proxy method to retrieve the actual file bytes.
141+
142+
| Name | Type | Required | Description |
143+
| --- | --- | --- | --- |
144+
| `file_id` | string | Yes | ID of the file to download. Get it from `box_folder_items_list` on folder_id `"0"`. |
145+
| `version` | string | No | File version ID to download a specific version. Get it from `box_file_versions_list`. |
146+
147+
<Aside type="note" title="Retrieving file bytes">
148+
To read the downloaded file content, use the Scalekit SDK proxy method instead of this tool:
149+
150+
```python
151+
result = scalekit_client.actions.request(
152+
connection_name="box",
153+
identifier="user_123",
154+
path=f"/2.0/files/{file_id}/content",
155+
method="GET",
156+
)
157+
```
158+
</Aside>
159+
160+
## `box_file_representations_get`
161+
162+
Retrieves available representations for a file, such as PDFs, extracted text, or image thumbnails. Box generates representations on demand — poll until the `status` is `success` before downloading.
163+
164+
| Name | Type | Required | Description |
165+
| --- | --- | --- | --- |
166+
| `file_id` | string | Yes | ID of the file. Get it from `box_folder_items_list`. |
167+
| `x_rep_hints` | string | Yes | Representation formats to request, e.g. `[pdf][extracted_text]` or `[jpg?dimensions=320x320]`. Multiple formats can be combined. |
168+
169+
<Aside type="tip" title="Common x_rep_hints values">
170+
| Value | Description |
171+
|-------|-------------|
172+
| `[pdf]` | PDF version of the file |
173+
| `[extracted_text]` | Plain text extracted from the file |
174+
| `[jpg?dimensions=320x320]` | JPEG thumbnail at 320×320 pixels |
175+
| `[pdf][extracted_text]` | Request multiple representations at once |
176+
</Aside>
177+
178+
## `box_file_upload`
179+
180+
Uploads a new text file (up to 50 MB) to a specified Box folder using multipart/form-data. File content is passed as plain text. For files larger than 50 MB, use Box's chunked upload API.
181+
182+
| Name | Type | Required | Description |
183+
| --- | --- | --- | --- |
184+
| `file_name` | string | Yes | Name to give the uploaded file, including the extension (e.g. `report.txt`). |
185+
| `parent_id` | string | Yes | ID of the folder to upload into. Use `"0"` for the root folder. |
186+
| `file_content` | string | Yes | Text content of the file to upload. |
187+
138188
### Folders
139189

140190
## `box_folder_get`

0 commit comments

Comments
 (0)