@@ -108,6 +108,9 @@ const VALID_ARGS: Record<string, Record<string, unknown>> = {
108108 update_record : { objectName : 'crm_opportunity' , recordId : 'r1' , data : { name : 'x' } } ,
109109 // `confirm: true`: without it the confirmation gate refuses before the bridge.
110110 delete_record : { objectName : 'crm_opportunity' , recordId : 'r1' , confirm : true } ,
111+ // [#30891] A selection is required (`where` or `recordIds`); `confirm: true`
112+ // deletes, where an unconfirmed call is answered with the refusal and a preview.
113+ delete_records : { objectName : 'crm_opportunity' , where : { stage : 'closed_lost' } , confirm : true } ,
111114 list_actions : { } ,
112115 run_action : { actionName : 'complete_task' } ,
113116 resume_run : { runId : 'run_1' } ,
@@ -214,12 +217,13 @@ describe('MCP tool arguments — undeclared keys are refused (#16913)', () => {
214217
215218 // ── The sweep: every advertised tool holds the same posture ────────────────
216219
217- it ( 'advertises the twelve tools this sweep covers' , async ( ) => {
220+ it ( 'advertises the thirteen tools this sweep covers' , async ( ) => {
218221 const json = await rpc ( runtime , bridge , 'tools/list' ) ;
219222 const names = ( json . result ?. tools ?? [ ] ) . map ( ( t : any ) => t . name ) . sort ( ) ;
220223 expect ( names ) . toEqual ( Object . keys ( VALID_ARGS ) . sort ( ) ) ;
221- // [#15705] Twelve with `resume_run`, which this stub's bridge implements.
222- expect ( names ) . toHaveLength ( 12 ) ;
224+ // [#15705] Twelve with `resume_run`, which this stub's bridge implements;
225+ // [#30891] thirteen with `delete_records`.
226+ expect ( names ) . toHaveLength ( 13 ) ;
223227 } ) ;
224228
225229 it ( 'every advertised tool ACCEPTS its declared arguments (the sweep control)' , async ( ) => {
0 commit comments