File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
src/datapilot/core/mcp_utils Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -116,9 +116,20 @@ def create_mcp_proxy():
116116
117117 # Execute with processed parameters
118118 output = asyncio .run (list_tools (command = server_config ["command" ], args = processed_args , env = processed_env ))
119+ # Add processed parameters to output
119120 output_with_name = {
120121 "name" : server_name ,
121122 "config" : input_configs ,
123+ "command" : server_config ["command" ],
124+ "args" : [
125+ f"${{{ input_id } }}" if any (input_val in str (arg ) for input_val in inputs .values ()) else arg
126+ for arg , input_id in zip (server_config .get ("args" , []), inputs .keys ())
127+ ],
128+ "env" : {
129+ k : f"${{{ input_id } }}" if any (input_val in str (v ) for input_val in inputs .values ()) else v
130+ for k , v in server_config .get ("env" , {}).items ()
131+ for input_id in inputs
132+ },
122133 ** output
123134 }
124135 output_json = json .dumps (output_with_name , indent = 2 )
You can’t perform that action at this time.
0 commit comments