Skip to content

Commit afa61ff

Browse files
committed
fix(google-vault): document full-replace semantics on hold update query filters
Cursor Bugbot: update_matters_holds only sets query.mailQuery/groupsQuery/ driveQuery when terms/date/shared-drive fields are provided, but the PUT replaces the whole hold — omitting a previously-set filter clears it, not leaves it unchanged. Filters are legitimately optional (a hold may have none), so this can't be hard-required like scope; instead the tool and field descriptions now explicitly state the full-replace behavior and direct callers to resupply current values via Vault List Holds first.
1 parent f0f8986 commit afa61ff

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

apps/sim/tools/google_vault/update_matters_holds.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import type { ToolConfig } from '@/tools/types'
55
export const updateMattersHoldsTool: ToolConfig<GoogleVaultUpdateMattersHoldsParams> = {
66
id: 'google_vault_update_matters_holds',
77
name: 'Vault Update Hold',
8-
description: 'Update the name, query, or scope of an existing hold',
8+
description:
9+
'Replace the name, query, and scope of an existing hold. This is a full-resource update: fetch the current hold first (Vault List Holds) and resupply every field you want to keep — any field left blank is cleared, not left unchanged.',
910
version: '1.0.0',
1011

1112
oauth: {
@@ -63,27 +64,28 @@ export const updateMattersHoldsTool: ToolConfig<GoogleVaultUpdateMattersHoldsPar
6364
required: false,
6465
visibility: 'user-or-llm',
6566
description:
66-
'Search terms to filter held content (e.g., "from:sender@example.com subject:invoice", for MAIL and GROUPS corpus)',
67+
'Search terms to filter held content (e.g., "from:sender@example.com subject:invoice", for MAIL and GROUPS corpus). Resupply the hold\'s current terms to keep them — this replaces the hold, so leaving it blank clears any existing filter.',
6768
},
6869
startTime: {
6970
type: 'string',
7071
required: false,
7172
visibility: 'user-or-llm',
7273
description:
73-
'Start time for date filtering (ISO 8601 format, e.g., "2024-01-01T00:00:00Z", for MAIL and GROUPS corpus)',
74+
'Start time for date filtering (ISO 8601 format, e.g., "2024-01-01T00:00:00Z", for MAIL and GROUPS corpus). Resupply the hold\'s current value to keep it — leaving it blank clears any existing date filter.',
7475
},
7576
endTime: {
7677
type: 'string',
7778
required: false,
7879
visibility: 'user-or-llm',
7980
description:
80-
'End time for date filtering (ISO 8601 format, e.g., "2024-12-31T23:59:59Z", for MAIL and GROUPS corpus)',
81+
'End time for date filtering (ISO 8601 format, e.g., "2024-12-31T23:59:59Z", for MAIL and GROUPS corpus). Resupply the hold\'s current value to keep it — leaving it blank clears any existing date filter.',
8182
},
8283
includeSharedDrives: {
8384
type: 'boolean',
8485
required: false,
8586
visibility: 'user-only',
86-
description: 'Include files in shared drives (for DRIVE corpus)',
87+
description:
88+
'Include files in shared drives (for DRIVE corpus). Resupply true if the hold currently includes shared drives — leaving it false/blank clears that setting.',
8789
},
8890
},
8991

0 commit comments

Comments
 (0)