Skip to main content
Glama

get-users

Retrieve a complete list of all users in your Zulip organization with their profile information to access the full user directory.

Instructions

👥 ALL USERS: Get complete list of all users in the organization with their profile information. Use this to see everyone at once or when you need the full user directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
client_gravatarNoInclude Gravatar URLs for users (default: true)
include_custom_profile_fieldsNoInclude custom profile fields (default: false)

Implementation Reference

  • Primary handler and registration for the 'get-users' tool. Registers the tool with MCP server, defines input schema reference, and implements the execution logic which calls ZulipClient.getUsers() and formats the response as JSON.
    server.tool(
      "get-users",
      "👥 ALL USERS: Get complete list of all users in the organization with their profile information. Use this to see everyone at once or when you need the full user directory.",
      ListUsersSchema.shape,
      async ({ client_gravatar, include_custom_profile_fields }) => {
        try {
          const result = await zulipClient.getUsers({
            client_gravatar,
            include_custom_profile_fields
          });
          
          return createSuccessResponse(JSON.stringify({
            user_count: result.members.length,
            users: result.members.map(user => ({
              id: user.user_id,
              email: user.email,
              full_name: user.full_name,
              is_active: user.is_active,
              is_bot: user.is_bot,
              role: user.is_owner ? 'owner' : 
                    user.is_admin ? 'admin' : 
                    user.is_moderator ? 'moderator' : 
                    user.is_guest ? 'guest' : 'member',
              date_joined: user.date_joined,
              timezone: user.timezone,
              avatar_url: user.avatar_url
            }))
          }, null, 2));
        } catch (error) {
          return createErrorResponse(`Error listing users: ${error instanceof Error ? error.message : 'Unknown error'}`);
        }
      }
    );
  • Zod input schema definition for the get-users tool, defining optional parameters for Gravatar inclusion and custom profile fields.
    export const ListUsersSchema = z.object({
      client_gravatar: z.boolean().optional().describe("Include Gravatar URLs for users (default: true)"),
      include_custom_profile_fields: z.boolean().optional().describe("Include custom profile fields (default: false)")
    });
  • ZulipClient helper method getUsers() that performs the actual API request to Zulip's /users endpoint, filtering undefined params before the GET request.
    async getUsers(params: {
      client_gravatar?: boolean;
      include_custom_profile_fields?: boolean;
    } = {}): Promise<{ members: ZulipUser[] }> {
      // Filter out undefined values
      const filteredParams = Object.fromEntries(
        Object.entries(params).filter(([, value]) => value !== undefined)
      );
      const response = await this.client.get('/users', { params: filteredParams });
      return response.data;
    }
Behavior3/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. It mentions the tool retrieves 'complete list' and 'profile information', which implies a read-only operation, but doesn't disclose behavioral traits like rate limits, pagination, permissions needed, or response format. The description adds some context but lacks depth for a tool with no annotations.

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

Conciseness5/5

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

The description is front-loaded with key information ('ALL USERS: Get complete list...') and uses only two concise sentences. Every sentence earns its place by clarifying purpose and usage, with no wasted words or redundancy.

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 no annotations and no output schema, the description is moderately complete for a read-only list tool. It covers purpose and usage well but lacks details on behavioral aspects like response structure or limitations. It's adequate but has clear gaps in transparency.

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?

Schema description coverage is 100%, so the schema fully documents the two parameters (client_gravatar, include_custom_profile_fields). The description doesn't add any parameter-specific information beyond what's in the schema, such as explaining how these options affect the output. Baseline 3 is appropriate when schema does the heavy lifting.

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

Purpose5/5

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

The description clearly states the verb ('Get complete list') and resource ('all users in the organization with their profile information'), making the purpose specific. It distinguishes from sibling tools like 'get-user' (singular) and 'search-users' by emphasizing 'ALL USERS' and 'full user directory'.

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

Usage Guidelines5/5

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

The description explicitly provides usage guidance: 'Use this to see everyone at once or when you need the full user directory.' This indicates when to use this tool (for complete lists) versus alternatives like 'get-user' (for individual users) or 'search-users' (for filtered searches), though it doesn't name them directly.

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/avisekrath/zulip-mcp-server'

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