list_entities
View which users, agents, apps, or runs currently hold stored memories in the Mem0 memory system to track memory ownership and access.
Instructions
List which users/agents/apps/runs currently hold memories.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mem0_mcp_server/server.py:371-378 (handler)The list_entities tool handler function, which is registered via @server.tool decorator. It resolves the Mem0 API settings, gets the client, and calls client.users to list all entities (users/agents/apps/runs) with memories.@server.tool(description="List which users/agents/apps/runs currently hold memories.") def list_entities(ctx: Context | None = None) -> str: """List users/agents/apps/runs with stored memories.""" api_key, _, _ = _resolve_settings(ctx) client = _mem0_client(api_key) return _mem0_call(client.users)
- src/mem0_mcp_server/server.py:371-371 (registration)Registration of the list_entities tool using the @server.tool decorator in the FastMCP server instance.@server.tool(description="List which users/agents/apps/runs currently hold memories.")