Skip to content

Commit b4d8f9d

Browse files
waleedlatif1claude
andcommitted
fix(box): rename items output to entries for list_folder_items
Rename the output field from "items" to "entries" to match Box API naming and avoid collision with JSON schema "items" keyword that prevented the docs generator from rendering the nested array structure. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a7943c3 commit b4d8f9d

File tree

4 files changed

+19
-14
lines changed

4 files changed

+19
-14
lines changed

apps/docs/content/docs/en/tools/box.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@ List files and folders in a Box folder
128128

129129
| Parameter | Type | Description |
130130
| --------- | ---- | ----------- |
131+
| `entries` | array | List of items in the folder |
132+
|`type` | string | Item type \(file, folder, web_link\) |
133+
|`id` | string | Item ID |
134+
|`name` | string | Item name |
135+
|`size` | number | Item size in bytes |
136+
|`createdAt` | string | Creation timestamp |
137+
|`modifiedAt` | string | Last modified timestamp |
131138
| `totalCount` | number | Total number of items in the folder |
132139
| `offset` | number | Current pagination offset |
133140
| `limit` | number | Current pagination limit |

apps/sim/blocks/blocks/box.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ export const BoxBlock: BlockConfig = {
364364
commentCount: 'number',
365365
file: 'file',
366366
content: 'string',
367-
items: 'json',
367+
entries: 'json',
368368
totalCount: 'number',
369369
offset: 'number',
370370
limit: 'number',

apps/sim/tools/box/list_folder_items.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export const boxListFolderItemsTool: ToolConfig<BoxListFolderItemsParams, BoxFol
7979
return {
8080
success: true,
8181
output: {
82-
items: (data.entries ?? []).map((item: Record<string, unknown>) => ({
82+
entries: (data.entries ?? []).map((item: Record<string, unknown>) => ({
8383
type: item.type ?? '',
8484
id: item.id ?? '',
8585
name: item.name ?? '',

apps/sim/tools/box/types.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export interface BoxFileInfoResponse extends ToolResponse {
117117

118118
export interface BoxFolderItemsResponse extends ToolResponse {
119119
output: {
120-
items: Array<Record<string, unknown>>
120+
entries: Array<Record<string, unknown>>
121121
totalCount: number
122122
offset: number
123123
limit: number
@@ -186,22 +186,20 @@ export const FILE_OUTPUT_PROPERTIES = {
186186
commentCount: { type: 'number', description: 'Number of comments', optional: true },
187187
} as const satisfies Record<string, OutputProperty>
188188

189-
export const FOLDER_ITEM_OUTPUT_PROPERTIES = {
190-
type: { type: 'string', description: 'Item type (file, folder, web_link)' },
191-
id: { type: 'string', description: 'Item ID' },
192-
name: { type: 'string', description: 'Item name' },
193-
size: { type: 'number', description: 'Item size in bytes', optional: true },
194-
createdAt: { type: 'string', description: 'Creation timestamp', optional: true },
195-
modifiedAt: { type: 'string', description: 'Last modified timestamp', optional: true },
196-
} as const satisfies Record<string, OutputProperty>
197-
198189
export const FOLDER_ITEMS_OUTPUT_PROPERTIES = {
199-
items: {
190+
entries: {
200191
type: 'array',
201192
description: 'List of items in the folder',
202193
items: {
203194
type: 'object',
204-
properties: FOLDER_ITEM_OUTPUT_PROPERTIES,
195+
properties: {
196+
type: { type: 'string', description: 'Item type (file, folder, web_link)' },
197+
id: { type: 'string', description: 'Item ID' },
198+
name: { type: 'string', description: 'Item name' },
199+
size: { type: 'number', description: 'Item size in bytes', optional: true },
200+
createdAt: { type: 'string', description: 'Creation timestamp', optional: true },
201+
modifiedAt: { type: 'string', description: 'Last modified timestamp', optional: true },
202+
},
205203
},
206204
},
207205
totalCount: { type: 'number', description: 'Total number of items in the folder' },

0 commit comments

Comments
 (0)