list_users
Retrieve all unique participant names from indexed Slack threads to identify valid users for filtering search results.
Instructions
List all known participants across indexed Slack threads.
Scans the thread_users metadata field to return all unique participant names. Useful for discovering valid values for the user_filter parameter in search().
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.py:299-318 (handler)The handler function that implements the list_users MCP tool. It retrieves all metadata from the vector store, extracts unique user names from the thread_users field, and returns a sorted list of participants with a count.
@mcp.tool() def list_users() -> dict: """List all known participants across indexed Slack threads. Scans the thread_users metadata field to return all unique participant names. Useful for discovering valid values for the user_filter parameter in search(). """ store = _get_store() all_docs = store.get(include=["metadatas"]) users: set[str] = set() for meta in all_docs["metadatas"]: thread_users = meta.get("thread_users", "") if thread_users: for name in thread_users.split(", "): name = name.strip() if name: users.add(name) return {"users": sorted(users), "count": len(users)} - server.py:299-299 (registration)The @mcp.tool() decorator registers the list_users function as an MCP tool, making it available to clients.
@mcp.tool() - server.py:300-305 (schema)The function signature and docstring define the tool's interface: it takes no parameters and returns a dict with users list and count. The docstring serves as the tool's description for MCP clients.
def list_users() -> dict: """List all known participants across indexed Slack threads. Scans the thread_users metadata field to return all unique participant names. Useful for discovering valid values for the user_filter parameter in search(). """