Skip to content

Commit 19469b8

Browse files
committed
fixed inputs and outputs
1 parent f40499f commit 19469b8

File tree

9 files changed

+240
-64
lines changed

9 files changed

+240
-64
lines changed

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

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Create an export in a matter
4242

4343
| Parameter | Type | Required | Description |
4444
| --------- | ---- | -------- | ----------- |
45-
| `matterId` | string | Yes | No description |
46-
| `exportName` | string | Yes | No description |
45+
| `matterId` | string | Yes | The matter ID |
46+
| `exportName` | string | Yes | Name for the export \(avoid special characters\) |
4747
| `corpus` | string | Yes | Data corpus to export \(MAIL, DRIVE, GROUPS, HANGOUTS_CHAT, VOICE\) |
4848
| `accountEmails` | string | No | Comma-separated list of user emails to scope export |
4949
| `orgUnitId` | string | No | Organization unit ID to scope export \(alternative to emails\) |
@@ -65,10 +65,10 @@ List exports for a matter
6565

6666
| Parameter | Type | Required | Description |
6767
| --------- | ---- | -------- | ----------- |
68-
| `matterId` | string | Yes | No description |
69-
| `pageSize` | number | No | No description |
70-
| `pageToken` | string | No | No description |
71-
| `exportId` | string | No | No description |
68+
| `matterId` | string | Yes | The matter ID |
69+
| `pageSize` | number | No | Number of exports to return per page |
70+
| `pageToken` | string | No | Token for pagination |
71+
| `exportId` | string | No | Optional export ID to fetch a specific export |
7272

7373
#### Output
7474

@@ -86,10 +86,10 @@ Download a single file from a Google Vault export (GCS object)
8686

8787
| Parameter | Type | Required | Description |
8888
| --------- | ---- | -------- | ----------- |
89-
| `matterId` | string | Yes | No description |
90-
| `bucketName` | string | Yes | No description |
91-
| `objectName` | string | Yes | No description |
92-
| `fileName` | string | No | No description |
89+
| `matterId` | string | Yes | The matter ID |
90+
| `bucketName` | string | Yes | GCS bucket name from cloudStorageSink.files.bucketName |
91+
| `objectName` | string | Yes | GCS object name from cloudStorageSink.files.objectName |
92+
| `fileName` | string | No | Optional filename override for the downloaded file |
9393

9494
#### Output
9595

@@ -105,8 +105,8 @@ Create a hold in a matter
105105

106106
| Parameter | Type | Required | Description |
107107
| --------- | ---- | -------- | ----------- |
108-
| `matterId` | string | Yes | No description |
109-
| `holdName` | string | Yes | No description |
108+
| `matterId` | string | Yes | The matter ID |
109+
| `holdName` | string | Yes | Name for the hold |
110110
| `corpus` | string | Yes | Data corpus to hold \(MAIL, DRIVE, GROUPS, HANGOUTS_CHAT, VOICE\) |
111111
| `accountEmails` | string | No | Comma-separated list of user emails to put on hold |
112112
| `orgUnitId` | string | No | Organization unit ID to put on hold \(alternative to accounts\) |
@@ -129,10 +129,10 @@ List holds for a matter
129129

130130
| Parameter | Type | Required | Description |
131131
| --------- | ---- | -------- | ----------- |
132-
| `matterId` | string | Yes | No description |
133-
| `pageSize` | number | No | No description |
134-
| `pageToken` | string | No | No description |
135-
| `holdId` | string | No | No description |
132+
| `matterId` | string | Yes | The matter ID |
133+
| `pageSize` | number | No | Number of holds to return per page |
134+
| `pageToken` | string | No | Token for pagination |
135+
| `holdId` | string | No | Optional hold ID to fetch a specific hold |
136136

137137
#### Output
138138

@@ -150,8 +150,8 @@ Create a new matter in Google Vault
150150

151151
| Parameter | Type | Required | Description |
152152
| --------- | ---- | -------- | ----------- |
153-
| `name` | string | Yes | No description |
154-
| `description` | string | No | No description |
153+
| `name` | string | Yes | Name for the new matter |
154+
| `description` | string | No | Optional description for the matter |
155155

156156
#### Output
157157

@@ -167,9 +167,9 @@ List matters, or get a specific matter if matterId is provided
167167

168168
| Parameter | Type | Required | Description |
169169
| --------- | ---- | -------- | ----------- |
170-
| `pageSize` | number | No | No description |
171-
| `pageToken` | string | No | No description |
172-
| `matterId` | string | No | No description |
170+
| `pageSize` | number | No | Number of matters to return per page |
171+
| `pageToken` | string | No | Token for pagination |
172+
| `matterId` | string | No | Optional matter ID to fetch a specific matter |
173173

174174
#### Output
175175

apps/sim/blocks/blocks/google_vault.ts

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
206206
},
207207
// Date filtering for holds (only works with MAIL and GROUPS corpus)
208208
{
209-
id: 'startTime',
209+
id: 'holdStartTime',
210210
title: 'Start Time',
211211
type: 'short-input',
212212
placeholder: 'YYYY-MM-DDTHH:mm:ssZ',
@@ -232,7 +232,7 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
232232
},
233233
},
234234
{
235-
id: 'endTime',
235+
id: 'holdEndTime',
236236
title: 'End Time',
237237
type: 'short-input',
238238
placeholder: 'YYYY-MM-DDTHH:mm:ssZ',
@@ -286,7 +286,7 @@ Return ONLY the search query - no explanations, no quotes, no extra text.`,
286286
},
287287
// Search terms for holds (only works with MAIL and GROUPS corpus)
288288
{
289-
id: 'terms',
289+
id: 'holdTerms',
290290
title: 'Search Terms',
291291
type: 'long-input',
292292
placeholder: 'Enter search query (e.g., from:user@example.com subject:confidential)',
@@ -300,7 +300,7 @@ Return ONLY the search query - no explanations, no quotes, no extra text.`,
300300
prompt: `Generate a Google Vault search query based on the user's description.
301301
The query can use Gmail-style search operators:
302302
- from:user@example.com - emails from specific sender
303-
- to:user@example.com - emails to specific recipient
303+
- to:user@example.com - emails to specific recipient
304304
- subject:keyword - emails with keyword in subject
305305
- has:attachment - emails with attachments
306306
- filename:pdf - emails with PDF attachments
@@ -438,10 +438,14 @@ Return ONLY the description text - no explanations, no quotes, no extra text.`,
438438
}
439439
},
440440
params: (params) => {
441-
const { credential, ...rest } = params
441+
const { credential, holdStartTime, holdEndTime, holdTerms, ...rest } = params
442442
return {
443443
...rest,
444444
credential,
445+
// Map hold-specific fields to their tool parameter names
446+
...(holdStartTime && { startTime: holdStartTime }),
447+
...(holdEndTime && { endTime: holdEndTime }),
448+
...(holdTerms && { terms: holdTerms }),
445449
}
446450
},
447451
},
@@ -463,6 +467,18 @@ Return ONLY the description text - no explanations, no quotes, no extra text.`,
463467

464468
// Create hold inputs
465469
holdName: { type: 'string', description: 'Name for the hold' },
470+
holdStartTime: {
471+
type: 'string',
472+
description: 'Start time for hold date filtering (ISO 8601 format, MAIL/GROUPS only)',
473+
},
474+
holdEndTime: {
475+
type: 'string',
476+
description: 'End time for hold date filtering (ISO 8601 format, MAIL/GROUPS only)',
477+
},
478+
holdTerms: {
479+
type: 'string',
480+
description: 'Search query terms for hold (MAIL/GROUPS only)',
481+
},
466482
includeSharedDrives: {
467483
type: 'boolean',
468484
description: 'Include files in shared drives (for DRIVE corpus holds)',
@@ -484,12 +500,32 @@ Return ONLY the description text - no explanations, no quotes, no extra text.`,
484500
description: { type: 'string', description: 'Matter description' },
485501
},
486502
outputs: {
487-
matters: { type: 'json', description: 'Array of matter objects (for list_matters)' },
488-
exports: { type: 'json', description: 'Array of export objects (for list_matters_export)' },
489-
holds: { type: 'json', description: 'Array of hold objects (for list_matters_holds)' },
490-
matter: { type: 'json', description: 'Created matter object (for create_matters)' },
491-
export: { type: 'json', description: 'Created export object (for create_matters_export)' },
492-
hold: { type: 'json', description: 'Created hold object (for create_matters_holds)' },
503+
matters: {
504+
type: 'json',
505+
description: 'Array of matter objects (for list_matters without matterId)',
506+
},
507+
exports: {
508+
type: 'json',
509+
description: 'Array of export objects (for list_matters_export without exportId)',
510+
},
511+
holds: {
512+
type: 'json',
513+
description: 'Array of hold objects (for list_matters_holds without holdId)',
514+
},
515+
matter: {
516+
type: 'json',
517+
description: 'Single matter object (for create_matters or list_matters with matterId)',
518+
},
519+
export: {
520+
type: 'json',
521+
description:
522+
'Single export object (for create_matters_export or list_matters_export with exportId)',
523+
},
524+
hold: {
525+
type: 'json',
526+
description:
527+
'Single hold object (for create_matters_holds or list_matters_holds with holdId)',
528+
},
493529
file: { type: 'json', description: 'Downloaded export file (UserFile) from execution files' },
494530
nextPageToken: {
495531
type: 'string',

apps/sim/tools/google_vault/create_matters.ts

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,24 @@ export const createMattersTool: ToolConfig<GoogleVaultCreateMattersParams> = {
1414
},
1515

1616
params: {
17-
accessToken: { type: 'string', required: true, visibility: 'hidden' },
18-
name: { type: 'string', required: true, visibility: 'user-only' },
19-
description: { type: 'string', required: false, visibility: 'user-only' },
17+
accessToken: {
18+
type: 'string',
19+
required: true,
20+
visibility: 'hidden',
21+
description: 'OAuth access token',
22+
},
23+
name: {
24+
type: 'string',
25+
required: true,
26+
visibility: 'user-only',
27+
description: 'Name for the new matter',
28+
},
29+
description: {
30+
type: 'string',
31+
required: false,
32+
visibility: 'user-only',
33+
description: 'Optional description for the matter',
34+
},
2035
},
2136

2237
request: {

apps/sim/tools/google_vault/create_matters_export.ts

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { ToolConfig } from '@/tools/types'
44

55
export const createMattersExportTool: ToolConfig<GoogleVaultCreateMattersExportParams> = {
66
id: 'google_vault_create_matters_export',
7-
name: 'Vault Create Export (by Matter)',
7+
name: 'Vault Create Export',
88
description: 'Create an export in a matter',
99
version: '1.0',
1010

@@ -14,9 +14,24 @@ export const createMattersExportTool: ToolConfig<GoogleVaultCreateMattersExportP
1414
},
1515

1616
params: {
17-
accessToken: { type: 'string', required: true, visibility: 'hidden' },
18-
matterId: { type: 'string', required: true, visibility: 'user-only' },
19-
exportName: { type: 'string', required: true, visibility: 'user-only' },
17+
accessToken: {
18+
type: 'string',
19+
required: true,
20+
visibility: 'hidden',
21+
description: 'OAuth access token',
22+
},
23+
matterId: {
24+
type: 'string',
25+
required: true,
26+
visibility: 'user-only',
27+
description: 'The matter ID',
28+
},
29+
exportName: {
30+
type: 'string',
31+
required: true,
32+
visibility: 'user-only',
33+
description: 'Name for the export (avoid special characters)',
34+
},
2035
corpus: {
2136
type: 'string',
2237
required: true,

apps/sim/tools/google_vault/create_matters_holds.ts

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { ToolConfig } from '@/tools/types'
44

55
export const createMattersHoldsTool: ToolConfig<GoogleVaultCreateMattersHoldsParams> = {
66
id: 'google_vault_create_matters_holds',
7-
name: 'Vault Create Hold (by Matter)',
7+
name: 'Vault Create Hold',
88
description: 'Create a hold in a matter',
99
version: '1.0',
1010

@@ -14,9 +14,24 @@ export const createMattersHoldsTool: ToolConfig<GoogleVaultCreateMattersHoldsPar
1414
},
1515

1616
params: {
17-
accessToken: { type: 'string', required: true, visibility: 'hidden' },
18-
matterId: { type: 'string', required: true, visibility: 'user-only' },
19-
holdName: { type: 'string', required: true, visibility: 'user-only' },
17+
accessToken: {
18+
type: 'string',
19+
required: true,
20+
visibility: 'hidden',
21+
description: 'OAuth access token',
22+
},
23+
matterId: {
24+
type: 'string',
25+
required: true,
26+
visibility: 'user-only',
27+
description: 'The matter ID',
28+
},
29+
holdName: {
30+
type: 'string',
31+
required: true,
32+
visibility: 'user-only',
33+
description: 'Name for the hold',
34+
},
2035
corpus: {
2136
type: 'string',
2237
required: true,

apps/sim/tools/google_vault/download_export_file.ts

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,36 @@ export const downloadExportFileTool: ToolConfig<GoogleVaultDownloadExportFilePar
1414
},
1515

1616
params: {
17-
accessToken: { type: 'string', required: true, visibility: 'hidden' },
18-
matterId: { type: 'string', required: true, visibility: 'user-only' },
19-
bucketName: { type: 'string', required: true, visibility: 'user-only' },
20-
objectName: { type: 'string', required: true, visibility: 'user-only' },
21-
fileName: { type: 'string', required: false, visibility: 'user-only' },
17+
accessToken: {
18+
type: 'string',
19+
required: true,
20+
visibility: 'hidden',
21+
description: 'OAuth access token',
22+
},
23+
matterId: {
24+
type: 'string',
25+
required: true,
26+
visibility: 'user-only',
27+
description: 'The matter ID',
28+
},
29+
bucketName: {
30+
type: 'string',
31+
required: true,
32+
visibility: 'user-only',
33+
description: 'GCS bucket name from cloudStorageSink.files.bucketName',
34+
},
35+
objectName: {
36+
type: 'string',
37+
required: true,
38+
visibility: 'user-only',
39+
description: 'GCS object name from cloudStorageSink.files.objectName',
40+
},
41+
fileName: {
42+
type: 'string',
43+
required: false,
44+
visibility: 'user-only',
45+
description: 'Optional filename override for the downloaded file',
46+
},
2247
},
2348

2449
request: {

apps/sim/tools/google_vault/list_matters.ts

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,30 @@ export const listMattersTool: ToolConfig<GoogleVaultListMattersParams> = {
1414
},
1515

1616
params: {
17-
accessToken: { type: 'string', required: true, visibility: 'hidden' },
18-
pageSize: { type: 'number', required: false, visibility: 'user-only' },
19-
pageToken: { type: 'string', required: false, visibility: 'hidden' },
20-
matterId: { type: 'string', required: false, visibility: 'user-only' },
17+
accessToken: {
18+
type: 'string',
19+
required: true,
20+
visibility: 'hidden',
21+
description: 'OAuth access token',
22+
},
23+
pageSize: {
24+
type: 'number',
25+
required: false,
26+
visibility: 'user-only',
27+
description: 'Number of matters to return per page',
28+
},
29+
pageToken: {
30+
type: 'string',
31+
required: false,
32+
visibility: 'hidden',
33+
description: 'Token for pagination',
34+
},
35+
matterId: {
36+
type: 'string',
37+
required: false,
38+
visibility: 'user-only',
39+
description: 'Optional matter ID to fetch a specific matter',
40+
},
2141
},
2242

2343
request: {

0 commit comments

Comments
 (0)