mnemostack_health
Check health of embedding, vector store, and optional graph components. Identify component operational status.
Instructions
Check health of mnemostack components (embedding, vector store, optional graph).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mnemostack/mcp/server.py:134-193 (handler)The mnemostack_health tool handler function. Checks health of embedding provider, Qdrant vector store, and optional Memgraph graph database. Returns a dict with ok boolean and per-component status.
@mcp.tool() def mnemostack_health() -> dict: """Check health of all mnemostack components. Read-only, no side effects, no authentication required. Returns a JSON object with ok (bool) and per-component status for the embedding provider, Qdrant vector store, and optional Memgraph graph database. Use this to verify the memory backend is reachable before issuing recall queries. """ result: dict[str, Any] = {"ok": True, "components": {}} try: emb = _get_embedding() ok, msg = emb.health_check() result["components"]["embedding"] = { "ok": ok, "provider": emb.name, "dimension": emb.dimension, "message": msg, } if not ok: result["ok"] = False except Exception as e: # noqa: BLE001 result["components"]["embedding"] = {"ok": False, "error": str(e)} result["ok"] = False try: vec = _get_vector() exists = vec.collection_exists() count = vec.count() if exists else 0 result["components"]["vector"] = { "ok": True, "collection": vec.collection, "exists": exists, "points": count, } except Exception as e: # noqa: BLE001 result["components"]["vector"] = {"ok": False, "error": str(e)} result["ok"] = False if memgraph_uri: try: from ..graph import GraphStore gs = GraphStore(uri=memgraph_uri, timeout=graph_timeout) ok, msg = gs.health_check() result["components"]["graph"] = { "ok": ok, "nodes": gs.count_nodes() if ok else 0, "edges": gs.count_edges() if ok else 0, "message": msg, } gs.close() if not ok: result["ok"] = False except Exception as e: # noqa: BLE001 result["components"]["graph"] = {"ok": False, "error": str(e)} result["ok"] = False return result - src/mnemostack/mcp/server.py:134-135 (registration)Registered via the @mcp.tool() decorator on the function, which registers it with the FastMCP server instance created at line 77.
@mcp.tool() def mnemostack_health() -> dict: - src/mnemostack/mcp/__init__.py:18-18 (helper)Documentation listing mnemostack_health as an exposed tool in the module docstring.
- mnemostack_health — check all components - tests/test_mcp.py:23-28 (helper)Test verifying that mnemostack_health is registered as a tool on the MCP server.
def test_build_server_registers_core_tools(): mcp = build_server(collection="test", embedding_provider="ollama") names = _list_tool_names(mcp) assert "mnemostack_health" in names assert "mnemostack_search" in names assert "mnemostack_answer" in names