@@ -105,7 +105,7 @@ function Request-Response {
105105 # Built-in tools
106106 # region File Search
107107 [Parameter ()]
108- [switch ]$UseFileSearch ,
108+ [switch ]$UseFileSearchTool ,
109109
110110 [Parameter (DontShow)]
111111 [string ]$FileSearchType = ' file_search' , # Currently, only 'file_search' is acceptable.
@@ -138,7 +138,7 @@ function Request-Response {
138138
139139 # region Web Search
140140 [Parameter ()]
141- [switch ]$UseWebSearch ,
141+ [switch ]$UseWebSearchTool ,
142142
143143 [Parameter ()]
144144 [Completions (' web_search' )]
@@ -170,7 +170,7 @@ function Request-Response {
170170
171171 # region Computer use
172172 [Parameter ()]
173- [switch ]$UseComputerUse ,
173+ [switch ]$UseComputerUseTool ,
174174
175175 [Parameter (DontShow)]
176176 [string ]$ComputerUseType = ' computer_use_preview' , # Currently, only 'computer_use_preview' is acceptable.
@@ -188,7 +188,7 @@ function Request-Response {
188188
189189 # region Remote MCP
190190 [Parameter ()]
191- [switch ]$UseRemoteMCP ,
191+ [switch ]$UseRemoteMCPTool ,
192192
193193 [Parameter (DontShow)]
194194 [string ]$RemoteMCPType = ' mcp' , # Always 'mcp'
@@ -220,7 +220,7 @@ function Request-Response {
220220
221221 # region Connectors
222222 [Parameter ()]
223- [switch ]$UseConnector ,
223+ [switch ]$UseConnectorTool ,
224224
225225 [Parameter ()]
226226 [ValidateNotNullOrEmpty ()]
@@ -250,7 +250,7 @@ function Request-Response {
250250
251251 # region Code Interpreter
252252 [Parameter ()]
253- [switch ]$UseCodeInterpreter ,
253+ [switch ]$UseCodeInterpreterTool ,
254254
255255 [Parameter (DontShow)]
256256 [string ]$CodeInterpreterType = ' code_interpreter' , # Always 'code_interpreter'
@@ -268,7 +268,7 @@ function Request-Response {
268268
269269 # region Image Generation
270270 [Parameter ()]
271- [switch ]$UseImageGeneration ,
271+ [switch ]$UseImageGenerationTool ,
272272
273273 [Parameter (DontShow)]
274274 [string ]$ImageGenerationType = ' image_generation' , # Always 'image_generation'
@@ -310,11 +310,21 @@ function Request-Response {
310310
311311 # region Local shell
312312 [Parameter ()]
313- [switch ]$UseLocalShell ,
313+ [switch ]$UseLocalShellTool ,
314314
315315 [Parameter (DontShow)]
316316 [string ]$LocalShellType = ' local_shell' , # Always 'local_shell'
317317 # endregion Local shell
318+
319+ # region shell
320+ [Parameter ()]
321+ [switch ]$UseShellTool ,
322+ # endregion shell
323+
324+ # region Apply patch
325+ [Parameter ()]
326+ [switch ]$UseApplyPatchTool ,
327+ # endregion Apply patch
318328 # endregion Tools
319329
320330 [Parameter ()]
@@ -679,7 +689,7 @@ function Request-Response {
679689 }
680690
681691 # region File Search
682- if ($UseFileSearch ) {
692+ if ($UseFileSearchTool ) {
683693 if ($FileSearchVectorStoreIds.Count -eq 0 ) {
684694 Write-Error ' VectorStore Ids must be specified.'
685695 }
@@ -722,7 +732,7 @@ function Request-Response {
722732 }
723733
724734 # region Web Search
725- if ($UseWebSearch ) {
735+ if ($UseWebSearchTool ) {
726736 $UserLocation = @ {}
727737 $WebSearchTool = @ {
728738 type = $WebSearchType
@@ -756,7 +766,7 @@ function Request-Response {
756766 }
757767
758768 # region Computer Use
759- if ($UseComputerUse ) {
769+ if ($UseComputerUseTool ) {
760770 # Computer Use should be used with 'truncation=auto'
761771 $PostBody.truncation = ' auto'
762772
@@ -785,7 +795,7 @@ function Request-Response {
785795 }
786796
787797 # region Remote MCP
788- if ($UseRemoteMCP ) {
798+ if ($UseRemoteMCPTool ) {
789799 # Server label and URL are required.
790800 if ([string ]::IsNullOrWhiteSpace($RemoteMCPServerLabel )) {
791801 Write-Error ' RemoteMCPServerLabel must be specified.'
@@ -838,7 +848,7 @@ function Request-Response {
838848 }
839849
840850 # region Connectors
841- if ($UseConnector ) {
851+ if ($UseConnectorTool ) {
842852 # Server label and connector_id are required.
843853 if ([string ]::IsNullOrWhiteSpace($ConnectorLabel )) {
844854 Write-Error ' ConnectorLabel must be specified.'
@@ -865,7 +875,7 @@ function Request-Response {
865875 }
866876
867877 # region Code Interpreter
868- if ($UseCodeInterpreter ) {
878+ if ($UseCodeInterpreterTool ) {
869879 $CodeInterpreterTool = @ {
870880 type = $CodeInterpreterType
871881 container = $ContainerId
@@ -884,7 +894,7 @@ function Request-Response {
884894 }
885895
886896 # region Image Generation
887- if ($UseImageGeneration ) {
897+ if ($UseImageGenerationTool ) {
888898 $ImageGenerationTool = @ {
889899 type = $ImageGenerationType
890900 }
@@ -928,13 +938,29 @@ function Request-Response {
928938 }
929939
930940 # region Local Shell
931- if ($UseLocalShell ) {
941+ if ($UseLocalShellTool ) {
932942 $LocalShellTool = @ {
933943 type = $LocalShellType
934944 }
935945 $Tools += $LocalShellTool
936946 }
937947
948+ # region shell
949+ if ($UseShellTool ) {
950+ $ShellTool = @ {
951+ type = ' shell'
952+ }
953+ $Tools += $ShellTool
954+ }
955+
956+ # region Apply Patch
957+ if ($UseApplyPatchTool ) {
958+ $ApplyPatchTool = @ {
959+ type = ' apply_patch'
960+ }
961+ $Tools += $ApplyPatchTool
962+ }
963+
938964 if ($Tools.Count -gt 0 ) {
939965 $PostBody.tools = $Tools
940966 }
0 commit comments