File tree Expand file tree Collapse file tree
tests/system/test_apps/ai_agentic_test_local_tools_app/bin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -299,18 +299,9 @@ async def connect_local_mcp(
299299 server_params = StdioServerParameters (
300300 command = sys .executable ,
301301 args = [local_tools_path ],
302+ env = dict (os .environ ),
302303 )
303304
304- # Splunk starts processes with a custom LD_LIBRARY_PATH env var, the mcp lib
305- # does not forward all env, but few restricted ones by default. If we don't do
306- # so then the shared object that python loads would fail to succeed.
307- # TODO: If needed we might in future pass all env vars, but we would have to investigate why
308- # the mcp lib did that filtering in the first place. For now we only allow additionally
309- # the LD_LIBRARY_PATH.
310- ld = os .environ .get ("LD_LIBRARY_PATH" )
311- if ld is not None :
312- server_params .env = {"LD_LIBRARY_PATH" : ld }
313-
314305 async with stdio_client (server_params ) as (read , write ):
315306 logging_handler = _MCPLoggingHandler (logger )
316307 async with ClientSession (
Original file line number Diff line number Diff line change 2222
2323registry = ToolRegistry ()
2424
25+ # Asserts that SPLUNK_HOME is available.
26+ assert os .environ ["SPLUNK_HOME" ] == "/opt/splunk"
27+
2528
2629@registry .tool (description = "Returns the current temperature in the city" )
2730def temperature (ctx : ToolContext , city : str ) -> str :
You can’t perform that action at this time.
0 commit comments