Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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()
  • 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().
        """

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/KanvaBhatia-Alaan/alaan-slack-indexed-mcp-tool'

If you have feedback or need assistance with the MCP directory API, please join our Discord server