list_users
Retrieve all users from your Gong workspace with details like name, email, and settings. Use this tool to manage user access and view workspace members.
Instructions
List all Gong users in your workspace. Returns user details including name, email, and settings.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | Pagination cursor for fetching next page of results |
Implementation Reference
- src/gong.ts:363-377 (handler)Core handler function in GongClient that implements the logic to fetch users from Gong API /v2/users endpoint with optional cursor and includeAvatars parameters.async listUsers(options?: { cursor?: string; includeAvatars?: boolean; }): Promise<UsersResponse> { const params: Record<string, string> = {}; if (options?.cursor) { params.cursor = options.cursor; } if (options?.includeAvatars !== undefined) { params.includeAvatars = String(options.includeAvatars); } return this.get<UsersResponse>('/users', params); }
- src/index.ts:102-114 (schema)Input schema and metadata registration for the 'list_users' tool provided to MCP clients via ListTools.name: "list_users", description: "List all Gong users in your workspace. Returns user details including name, email, and settings.", inputSchema: { type: "object", properties: { cursor: { type: "string", description: "Pagination cursor for fetching next page of results", }, }, }, },
- src/index.ts:205-217 (handler)MCP server dispatch handler that executes the list_users tool by calling gong.listUsers and formatting the response.case "list_users": { const result = await gong.listUsers({ cursor: args?.cursor as string | undefined, }); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
- src/gong.ts:96-105 (schema)TypeScript interface defining the structure of the response from the listUsers API call.export interface UsersResponse { requestId: string; records: { cursor?: string; totalRecords: number; currentPageSize: number; currentPageNumber: number; }; users: User[]; }