Skip to content

Commit aa46fb6

Browse files
committed
refactor: update tool_config args to use list format for improved readability
1 parent 7685246 commit aa46fb6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

apps/common/utils/tool_code.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import ast
33
import base64
44
import gzip
5+
import io
56
import json
67
import os
78
import socket
@@ -217,7 +218,10 @@ def get_tool_mcp_config(self, code, params):
217218
else:
218219
tool_config = {
219220
'command': sys.executable,
220-
'args': f'import base64,gzip; exec(gzip.decompress(base64.b64decode(\'{compressed_and_base64_encoded_code_str}\')).decode())',
221+
'args': [
222+
'-c',
223+
f'import base64,gzip; exec(gzip.decompress(base64.b64decode(\'{compressed_and_base64_encoded_code_str}\')).decode())',
224+
],
221225
'transport': 'stdio',
222226
}
223227
return tool_config

0 commit comments

Comments
 (0)