Skip to main content
Glama
piekstra

Slack MCP Server

by piekstra

list_users

Retrieve all users in a Slack workspace with optional parameters to limit results and include locale information for each user.

Instructions

List all users in the Slack workspace.

Args: limit: Maximum number of users to return include_locale: Include locale information for each user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
include_localeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main MCP tool handler for 'list_users'. Decorated with @mcp.tool() for registration. Creates SlackClient, calls its list_users method, and returns JSON-formatted result.
    @mcp.tool()
    async def list_users(limit: int = 100, include_locale: bool = False) -> str:
        """
        List all users in the Slack workspace.
    
        Args:
            limit: Maximum number of users to return
            include_locale: Include locale information for each user
        """
        try:
            client = SlackClient()
            result = await client.list_users(limit, include_locale)
            return json.dumps(result, indent=2)
        except Exception as e:
            return json.dumps({"error": str(e)}, indent=2)
  • Helper method in SlackClient class that makes the API call to Slack's 'users.list' endpoint.
    async def list_users(self, limit: int = 100, include_locale: bool = False) -> Dict[str, Any]:
        """List all users in the workspace."""
        params = {"limit": limit, "include_locale": include_locale}
        return await self._make_request("GET", "users.list", params=params)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'List all users' implies a read operation, the description doesn't mention important behavioral aspects like pagination behavior, rate limits, authentication requirements, or what happens when the limit is reached. The Args section only documents parameters, not behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded with the core purpose in the first sentence. The Args section is organized but could be more integrated. There's minimal waste, though the separation between description and Args could be smoother for optimal structure.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that there's an output schema (which handles return values), no annotations, and only 2 parameters with good description coverage in the Args section, the description is moderately complete. However, for a list operation with no annotation coverage, it should ideally mention pagination behavior or result format hints to be fully complete for agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description includes an Args section that explains what each parameter does ('Maximum number of users to return', 'Include locale information for each user'). However, with 0% schema description coverage, the schema provides no parameter documentation, so the description must compensate. The Args section adds meaningful semantics beyond the bare schema, but doesn't provide format details or constraints beyond what's stated.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'List all users in the Slack workspace.' This is a specific verb+resource combination that tells what the tool does. However, it doesn't explicitly distinguish this tool from sibling tools like 'get_user_info' or 'invite_to_channel', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of when this tool is appropriate versus 'get_user_info' (for single user details) or other user-related operations. The description only states what the tool does, not when to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/piekstra/slack-mcp-server'

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