Skip to content

Commit 8cf7982

Browse files
author
aadamgough
committed
added tag dropdown support
1 parent 47e3b7c commit 8cf7982

File tree

5 files changed

+328
-15
lines changed

5 files changed

+328
-15
lines changed

apps/sim/tools/google_drive/create_folder.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,19 @@ export const createFolderTool: ToolConfig<GoogleDriveToolParams, GoogleDriveUplo
9393

9494
outputs: {
9595
file: {
96-
type: 'json',
97-
description: 'Created folder metadata including ID, name, and parent information',
96+
type: 'object',
97+
description: 'Created folder metadata from Google Drive',
98+
properties: {
99+
id: { type: 'string', description: 'Google Drive folder ID' },
100+
name: { type: 'string', description: 'Folder name' },
101+
mimeType: { type: 'string', description: 'MIME type (application/vnd.google-apps.folder)' },
102+
webViewLink: { type: 'string', description: 'URL to view in browser' },
103+
webContentLink: { type: 'string', description: 'Direct download URL' },
104+
size: { type: 'string', description: 'Size in bytes' },
105+
createdTime: { type: 'string', description: 'Creation time' },
106+
modifiedTime: { type: 'string', description: 'Last modification time' },
107+
parents: { type: 'json', description: 'Parent folder IDs' },
108+
},
98109
},
99110
},
100111
}

apps/sim/tools/google_drive/download.ts

Lines changed: 88 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,95 @@ export const downloadTool: ToolConfig<GoogleDriveToolParams, GoogleDriveDownload
306306
},
307307

308308
outputs: {
309-
file: { type: 'file', description: 'Downloaded file stored in execution files' },
309+
file: {
310+
type: 'object',
311+
description: 'Downloaded file stored in execution files',
312+
properties: {
313+
id: { type: 'string', description: 'Unique file identifier' },
314+
name: { type: 'string', description: 'File name' },
315+
size: { type: 'number', description: 'File size in bytes' },
316+
type: { type: 'string', description: 'MIME type of the file' },
317+
url: { type: 'string', description: 'Signed URL to access the file' },
318+
key: { type: 'string', description: 'Storage key for the file' },
319+
context: { type: 'string', description: 'Context where file is stored' },
320+
},
321+
},
310322
metadata: {
311-
type: 'json',
312-
description:
313-
'Complete file metadata including ownership, sharing, permissions, labels, checksums, capabilities, and revision history',
323+
type: 'object',
324+
description: 'Complete file metadata from Google Drive',
325+
properties: {
326+
// Basic Info
327+
id: { type: 'string', description: 'Google Drive file ID' },
328+
name: { type: 'string', description: 'File name' },
329+
mimeType: { type: 'string', description: 'MIME type' },
330+
kind: { type: 'string', description: 'Resource type identifier' },
331+
description: { type: 'string', description: 'File description' },
332+
originalFilename: { type: 'string', description: 'Original uploaded filename' },
333+
fullFileExtension: { type: 'string', description: 'Full file extension' },
334+
fileExtension: { type: 'string', description: 'File extension' },
335+
// Ownership & Sharing
336+
owners: { type: 'json', description: 'List of file owners' },
337+
permissions: { type: 'json', description: 'File permissions' },
338+
permissionIds: { type: 'json', description: 'Permission IDs' },
339+
shared: { type: 'boolean', description: 'Whether file is shared' },
340+
ownedByMe: { type: 'boolean', description: 'Whether owned by current user' },
341+
writersCanShare: { type: 'boolean', description: 'Whether writers can share' },
342+
viewersCanCopyContent: { type: 'boolean', description: 'Whether viewers can copy' },
343+
copyRequiresWriterPermission: {
344+
type: 'boolean',
345+
description: 'Whether copy requires writer permission',
346+
},
347+
sharingUser: { type: 'json', description: 'User who shared the file' },
348+
// Labels/Tags
349+
starred: { type: 'boolean', description: 'Whether file is starred' },
350+
trashed: { type: 'boolean', description: 'Whether file is in trash' },
351+
explicitlyTrashed: { type: 'boolean', description: 'Whether explicitly trashed' },
352+
properties: { type: 'json', description: 'Custom properties' },
353+
appProperties: { type: 'json', description: 'App-specific properties' },
354+
// Timestamps
355+
createdTime: { type: 'string', description: 'File creation time' },
356+
modifiedTime: { type: 'string', description: 'Last modification time' },
357+
modifiedByMeTime: { type: 'string', description: 'When modified by current user' },
358+
viewedByMeTime: { type: 'string', description: 'When last viewed by current user' },
359+
sharedWithMeTime: { type: 'string', description: 'When shared with current user' },
360+
// User Info
361+
lastModifyingUser: { type: 'json', description: 'User who last modified the file' },
362+
viewedByMe: { type: 'boolean', description: 'Whether viewed by current user' },
363+
modifiedByMe: { type: 'boolean', description: 'Whether modified by current user' },
364+
// Links
365+
webViewLink: { type: 'string', description: 'URL to view in browser' },
366+
webContentLink: { type: 'string', description: 'Direct download URL' },
367+
iconLink: { type: 'string', description: 'URL to file icon' },
368+
thumbnailLink: { type: 'string', description: 'URL to thumbnail' },
369+
exportLinks: { type: 'json', description: 'Export format links' },
370+
// Size & Storage
371+
size: { type: 'string', description: 'File size in bytes' },
372+
quotaBytesUsed: { type: 'string', description: 'Storage quota used' },
373+
// Checksums
374+
md5Checksum: { type: 'string', description: 'MD5 hash' },
375+
sha1Checksum: { type: 'string', description: 'SHA-1 hash' },
376+
sha256Checksum: { type: 'string', description: 'SHA-256 hash' },
377+
// Hierarchy & Location
378+
parents: { type: 'json', description: 'Parent folder IDs' },
379+
spaces: { type: 'json', description: 'Spaces containing file' },
380+
driveId: { type: 'string', description: 'Shared drive ID' },
381+
// Capabilities
382+
capabilities: { type: 'json', description: 'User capabilities on file' },
383+
// Versions
384+
version: { type: 'string', description: 'Version number' },
385+
headRevisionId: { type: 'string', description: 'Head revision ID' },
386+
// Media Metadata
387+
hasThumbnail: { type: 'boolean', description: 'Whether has thumbnail' },
388+
thumbnailVersion: { type: 'string', description: 'Thumbnail version' },
389+
imageMediaMetadata: { type: 'json', description: 'Image-specific metadata' },
390+
videoMediaMetadata: { type: 'json', description: 'Video-specific metadata' },
391+
// Other
392+
isAppAuthorized: { type: 'boolean', description: 'Whether created by requesting app' },
393+
contentRestrictions: { type: 'json', description: 'Content restrictions' },
394+
linkShareMetadata: { type: 'json', description: 'Link share metadata' },
395+
// Revisions
396+
revisions: { type: 'json', description: 'File revision history' },
397+
},
314398
},
315399
},
316400
}

apps/sim/tools/google_drive/get_content.ts

Lines changed: 75 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,81 @@ export const getContentTool: ToolConfig<GoogleDriveToolParams, GoogleDriveGetCon
292292
description: 'File content as text (Google Workspace files are exported)',
293293
},
294294
metadata: {
295-
type: 'json',
296-
description:
297-
'Complete file metadata including ownership, sharing, permissions, labels, checksums, capabilities, and revision history',
295+
type: 'object',
296+
description: 'Complete file metadata from Google Drive',
297+
properties: {
298+
// Basic Info
299+
id: { type: 'string', description: 'Google Drive file ID' },
300+
name: { type: 'string', description: 'File name' },
301+
mimeType: { type: 'string', description: 'MIME type' },
302+
kind: { type: 'string', description: 'Resource type identifier' },
303+
description: { type: 'string', description: 'File description' },
304+
originalFilename: { type: 'string', description: 'Original uploaded filename' },
305+
fullFileExtension: { type: 'string', description: 'Full file extension' },
306+
fileExtension: { type: 'string', description: 'File extension' },
307+
// Ownership & Sharing
308+
owners: { type: 'json', description: 'List of file owners' },
309+
permissions: { type: 'json', description: 'File permissions' },
310+
permissionIds: { type: 'json', description: 'Permission IDs' },
311+
shared: { type: 'boolean', description: 'Whether file is shared' },
312+
ownedByMe: { type: 'boolean', description: 'Whether owned by current user' },
313+
writersCanShare: { type: 'boolean', description: 'Whether writers can share' },
314+
viewersCanCopyContent: { type: 'boolean', description: 'Whether viewers can copy' },
315+
copyRequiresWriterPermission: {
316+
type: 'boolean',
317+
description: 'Whether copy requires writer permission',
318+
},
319+
sharingUser: { type: 'json', description: 'User who shared the file' },
320+
// Labels/Tags
321+
starred: { type: 'boolean', description: 'Whether file is starred' },
322+
trashed: { type: 'boolean', description: 'Whether file is in trash' },
323+
explicitlyTrashed: { type: 'boolean', description: 'Whether explicitly trashed' },
324+
properties: { type: 'json', description: 'Custom properties' },
325+
appProperties: { type: 'json', description: 'App-specific properties' },
326+
// Timestamps
327+
createdTime: { type: 'string', description: 'File creation time' },
328+
modifiedTime: { type: 'string', description: 'Last modification time' },
329+
modifiedByMeTime: { type: 'string', description: 'When modified by current user' },
330+
viewedByMeTime: { type: 'string', description: 'When last viewed by current user' },
331+
sharedWithMeTime: { type: 'string', description: 'When shared with current user' },
332+
// User Info
333+
lastModifyingUser: { type: 'json', description: 'User who last modified the file' },
334+
viewedByMe: { type: 'boolean', description: 'Whether viewed by current user' },
335+
modifiedByMe: { type: 'boolean', description: 'Whether modified by current user' },
336+
// Links
337+
webViewLink: { type: 'string', description: 'URL to view in browser' },
338+
webContentLink: { type: 'string', description: 'Direct download URL' },
339+
iconLink: { type: 'string', description: 'URL to file icon' },
340+
thumbnailLink: { type: 'string', description: 'URL to thumbnail' },
341+
exportLinks: { type: 'json', description: 'Export format links' },
342+
// Size & Storage
343+
size: { type: 'string', description: 'File size in bytes' },
344+
quotaBytesUsed: { type: 'string', description: 'Storage quota used' },
345+
// Checksums
346+
md5Checksum: { type: 'string', description: 'MD5 hash' },
347+
sha1Checksum: { type: 'string', description: 'SHA-1 hash' },
348+
sha256Checksum: { type: 'string', description: 'SHA-256 hash' },
349+
// Hierarchy & Location
350+
parents: { type: 'json', description: 'Parent folder IDs' },
351+
spaces: { type: 'json', description: 'Spaces containing file' },
352+
driveId: { type: 'string', description: 'Shared drive ID' },
353+
// Capabilities
354+
capabilities: { type: 'json', description: 'User capabilities on file' },
355+
// Versions
356+
version: { type: 'string', description: 'Version number' },
357+
headRevisionId: { type: 'string', description: 'Head revision ID' },
358+
// Media Metadata
359+
hasThumbnail: { type: 'boolean', description: 'Whether has thumbnail' },
360+
thumbnailVersion: { type: 'string', description: 'Thumbnail version' },
361+
imageMediaMetadata: { type: 'json', description: 'Image-specific metadata' },
362+
videoMediaMetadata: { type: 'json', description: 'Video-specific metadata' },
363+
// Other
364+
isAppAuthorized: { type: 'boolean', description: 'Whether created by requesting app' },
365+
contentRestrictions: { type: 'json', description: 'Content restrictions' },
366+
linkShareMetadata: { type: 'json', description: 'Link share metadata' },
367+
// Revisions
368+
revisions: { type: 'json', description: 'File revision history' },
369+
},
298370
},
299371
},
300372
}

apps/sim/tools/google_drive/list.ts

Lines changed: 79 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,85 @@ export const listTool: ToolConfig<GoogleDriveToolParams, GoogleDriveListResponse
187187

188188
outputs: {
189189
files: {
190-
type: 'json',
191-
description:
192-
'Array of file metadata objects with complete ownership, sharing, permissions, labels, checksums, and capabilities',
190+
type: 'array',
191+
description: 'Array of file metadata objects from Google Drive',
192+
items: {
193+
properties: {
194+
// Basic Info
195+
id: { type: 'string', description: 'Google Drive file ID' },
196+
name: { type: 'string', description: 'File name' },
197+
mimeType: { type: 'string', description: 'MIME type' },
198+
kind: { type: 'string', description: 'Resource type identifier' },
199+
description: { type: 'string', description: 'File description' },
200+
originalFilename: { type: 'string', description: 'Original uploaded filename' },
201+
fullFileExtension: { type: 'string', description: 'Full file extension' },
202+
fileExtension: { type: 'string', description: 'File extension' },
203+
// Ownership & Sharing
204+
owners: { type: 'json', description: 'List of file owners' },
205+
permissions: { type: 'json', description: 'File permissions' },
206+
permissionIds: { type: 'json', description: 'Permission IDs' },
207+
shared: { type: 'boolean', description: 'Whether file is shared' },
208+
ownedByMe: { type: 'boolean', description: 'Whether owned by current user' },
209+
writersCanShare: { type: 'boolean', description: 'Whether writers can share' },
210+
viewersCanCopyContent: { type: 'boolean', description: 'Whether viewers can copy' },
211+
copyRequiresWriterPermission: {
212+
type: 'boolean',
213+
description: 'Whether copy requires writer permission',
214+
},
215+
sharingUser: { type: 'json', description: 'User who shared the file' },
216+
// Labels/Tags
217+
starred: { type: 'boolean', description: 'Whether file is starred' },
218+
trashed: { type: 'boolean', description: 'Whether file is in trash' },
219+
explicitlyTrashed: { type: 'boolean', description: 'Whether explicitly trashed' },
220+
properties: { type: 'json', description: 'Custom properties' },
221+
appProperties: { type: 'json', description: 'App-specific properties' },
222+
// Timestamps
223+
createdTime: { type: 'string', description: 'File creation time' },
224+
modifiedTime: { type: 'string', description: 'Last modification time' },
225+
modifiedByMeTime: { type: 'string', description: 'When modified by current user' },
226+
viewedByMeTime: { type: 'string', description: 'When last viewed by current user' },
227+
sharedWithMeTime: { type: 'string', description: 'When shared with current user' },
228+
// User Info
229+
lastModifyingUser: { type: 'json', description: 'User who last modified the file' },
230+
viewedByMe: { type: 'boolean', description: 'Whether viewed by current user' },
231+
modifiedByMe: { type: 'boolean', description: 'Whether modified by current user' },
232+
// Links
233+
webViewLink: { type: 'string', description: 'URL to view in browser' },
234+
webContentLink: { type: 'string', description: 'Direct download URL' },
235+
iconLink: { type: 'string', description: 'URL to file icon' },
236+
thumbnailLink: { type: 'string', description: 'URL to thumbnail' },
237+
exportLinks: { type: 'json', description: 'Export format links' },
238+
// Size & Storage
239+
size: { type: 'string', description: 'File size in bytes' },
240+
quotaBytesUsed: { type: 'string', description: 'Storage quota used' },
241+
// Checksums
242+
md5Checksum: { type: 'string', description: 'MD5 hash' },
243+
sha1Checksum: { type: 'string', description: 'SHA-1 hash' },
244+
sha256Checksum: { type: 'string', description: 'SHA-256 hash' },
245+
// Hierarchy & Location
246+
parents: { type: 'json', description: 'Parent folder IDs' },
247+
spaces: { type: 'json', description: 'Spaces containing file' },
248+
driveId: { type: 'string', description: 'Shared drive ID' },
249+
// Capabilities
250+
capabilities: { type: 'json', description: 'User capabilities on file' },
251+
// Versions
252+
version: { type: 'string', description: 'Version number' },
253+
headRevisionId: { type: 'string', description: 'Head revision ID' },
254+
// Media Metadata
255+
hasThumbnail: { type: 'boolean', description: 'Whether has thumbnail' },
256+
thumbnailVersion: { type: 'string', description: 'Thumbnail version' },
257+
imageMediaMetadata: { type: 'json', description: 'Image-specific metadata' },
258+
videoMediaMetadata: { type: 'json', description: 'Video-specific metadata' },
259+
// Other
260+
isAppAuthorized: { type: 'boolean', description: 'Whether created by requesting app' },
261+
contentRestrictions: { type: 'json', description: 'Content restrictions' },
262+
linkShareMetadata: { type: 'json', description: 'Link share metadata' },
263+
},
264+
},
265+
},
266+
nextPageToken: {
267+
type: 'string',
268+
description: 'Token for fetching the next page of results',
193269
},
194270
},
195271
}

0 commit comments

Comments
 (0)