File tree Expand file tree Collapse file tree 1 file changed +50
-50
lines changed
Expand file tree Collapse file tree 1 file changed +50
-50
lines changed Original file line number Diff line number Diff line change @@ -76,65 +76,65 @@ Check some examples:
7676
7777=== "Allow any tools by default"
7878
79- ``` javascript
80- {
81- " toolCall" : {
82- " approval" : {
83- " byDefault" : " allow"
84- }
85- }
86- }
87- ```
79+ ```javascript
80+ {
81+ "toolCall": {
82+ "approval": {
83+ "byDefault": "allow"
84+ }
85+ }
86+ }
87+ ```
8888
8989=== "Allow all but some tools"
9090
91- ``` javascript
92- {
93- " toolCall" : {
94- " approval" : {
95- " byDefault" : " allow" ,
96- " ask" : {
97- " eca_editfile" : {},
98- " my-mcp__my_tool" : {}
99- }
100- }
101- }
102- }
103- ```
91+ ```javascript
92+ {
93+ "toolCall": {
94+ "approval": {
95+ "byDefault": "allow",
96+ "ask": {
97+ "eca_editfile": {},
98+ "my-mcp__my_tool": {}
99+ }
100+ }
101+ }
102+ }
103+ ```
104104
105105=== "Ask all but all tools from some mcps"
106106
107- ``` javascript
108- {
109- " toolCall" : {
110- " approval" : {
111- // "byDefault": "ask", not needed as it's eca default
112- " allow" : {
113- " eca" : {},
114- " my-mcp" : {}
115- }
116- }
117- }
118- }
119- ```
107+ ```javascript
108+ {
109+ "toolCall": {
110+ "approval": {
111+ // "byDefault": "ask", not needed as it's eca default
112+ "allow": {
113+ "eca": {},
114+ "my-mcp": {}
115+ }
116+ }
117+ }
118+ }
119+ ```
120120
121121=== "Matching by a tool argument"
122122
123- __ ` argsMatchers ` __ is a map of argument name by list of [ java regex] ( https://www.regexplanet.com/advanced/java/index.html ) .
124-
125- ``` javascript
126- {
127- " toolCall" : {
128- " approval" : {
129- " byDefault" : " allow" ,
130- " allow" : {
131- " eca_shell_command" : {" argsMatchers" {" command" [" .*rm.*" ,
132- " .*mv.*" ]}}
133- }
134- }
135- }
136- }
137- ```
123+ __`argsMatchers`__ is a map of argument name by list of [java regex](https://www.regexplanet.com/advanced/java/index.html).
124+
125+ ```javascript
126+ {
127+ "toolCall": {
128+ "approval": {
129+ "byDefault": "allow",
130+ "allow": {
131+ "eca_shell_command": {"argsMatchers" {"command" [".*rm.*",
132+ ".*mv.*"]}}
133+ }
134+ }
135+ }
136+ }
137+ ```
138138
139139Also check the ` plan ` behavior which is safer.
140140
You can’t perform that action at this time.
0 commit comments