INNER CODE UNIT · Python

get_workspace

Nebulock-Inc/agentic-threat-hunting-framework · athf/mcp/server.py:38

def get_workspace() -> Path:
    """Return the current workspace path."""
    if _workspace is None:
        raise RuntimeError("ATHF MCP server not initialized. Call create_server() first.")
    return _workspace


def _json_result(data: Any) -> str:
    """Serialize a result to JSON string for MCP tool output."""
    return json.dumps(data, indent=2, default=str)


def _discover_plugin_tools() -> list:
    """Discover MCP tool registration functions from installed plugins."""
    from importlib.metadata import entry_points

    return list(entry_points(group="athf.mcp_tools"))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…