get_server_env_details
Retrieve system path and Python executable details from the Log Analyzer MCP server to aid in environment setup and log analysis.
Instructions
Returns sys.path and sys.executable from the running MCP server.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The handler function for the 'get_server_env_details' tool. It is registered via the @mcp.tool() decorator and returns a dictionary containing sys.executable, sys.path, current working directory, and the PYTHONPATH environment variable.@mcp.tool() async def get_server_env_details() -> dict[str, Any]: """Returns sys.path and sys.executable from the running MCP server.""" logger.info("get_server_env_details called.") details = { "sys_executable": sys.executable, "sys_path": sys.path, "cwd": os.getcwd(), "environ_pythonpath": os.environ.get("PYTHONPATH"), } logger.info(f"Server env details: {details}") return details