Skip to content

Commit 36a36aa

Browse files
committed
update tests
1 parent a3e2121 commit 36a36aa

File tree

2 files changed

+5
-471
lines changed

2 files changed

+5
-471
lines changed

mcpify/wrapper.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,15 @@ def run_async_in_thread():
8181
return f"Error executing tool: {str(e)}"
8282
else:
8383
# Use simple command line execution (backward compatibility)
84-
# This requires a command to be specified in the config
85-
command = self.config.get("command")
86-
if not command:
84+
args_template = tool_config.get("args", [])
85+
86+
# Check if we have args specified in the tool config
87+
if not args_template:
8788
return (
8889
"Error: No backend adapter configured and no command "
8990
"specified"
9091
)
9192

92-
args_template = tool_config.get("args", [])
9393
cmd_args = []
9494
for arg in args_template:
9595
if arg.startswith("{") and arg.endswith("}"):
@@ -100,7 +100,7 @@ def run_async_in_thread():
100100
cmd_args.append(arg)
101101

102102
result = subprocess.run(
103-
[command] + cmd_args, capture_output=True, text=True, cwd="."
103+
cmd_args, capture_output=True, text=True, cwd="."
104104
)
105105

106106
if result.returncode != 0:

0 commit comments

Comments
 (0)