def project_path(tmp_path):
    """
    Provides a temporary directory within the PROJECT_ROOT sandbox for tests.
    This ensures all file operations during tests are within the allowed directory.
    """
    # Get the test project root
    test_root = Path(os.environ.get("MCP_PROJECT_ROOT", "/tmp"))

    # Create a subdirectory for this specific test
    test_dir = test_root / f"test_{tmp_path.name}"
    test_dir.mkdir(parents=True, exist_ok=True)

    return test_dir

    Provides a temporary directory within the PROJECT_ROOT sandbox for tests.
    This ensures all file operations during tests are within the allowed directory.
    
tests/conftest.py