feat(slack): add email field to get user and list users tools (#3509)

* feat(slack): add email field to get user and list users tools

* fix(slack): use empty string fallback for email and make type non-optional

* fix(slack): comment out users:read.email scope pending app review
This commit is contained in:
Waleed
2026-03-12 13:27:37 -07:00
committed by GitHub
parent aa0101c666
commit e7b4da2689
6 changed files with 17 additions and 0 deletions
@@ -590,6 +590,7 @@ List all users in a Slack workspace. Returns user profiles with names and avatar
| ↳ `name` | string | Username \(handle\) |
| ↳ `real_name` | string | Full real name |
| ↳ `display_name` | string | Display name shown in Slack |
| ↳ `email` | string | Email address \(requires users:read.email scope\) |
| ↳ `is_bot` | boolean | Whether the user is a bot |
| ↳ `is_admin` | boolean | Whether the user is a workspace admin |
| ↳ `is_owner` | boolean | Whether the user is the workspace owner |
@@ -629,6 +630,7 @@ Get detailed information about a specific Slack user by their user ID.
| ↳ `title` | string | Job title |
| ↳ `phone` | string | Phone number |
| ↳ `skype` | string | Skype handle |
| ↳ `email` | string | Email address \(requires users:read.email scope\) |
| ↳ `is_bot` | boolean | Whether the user is a bot |
| ↳ `is_admin` | boolean | Whether the user is a workspace admin |
| ↳ `is_owner` | boolean | Whether the user is the workspace owner |
+1
View File
@@ -624,6 +624,7 @@ export const OAUTH_PROVIDERS: Record<string, OAuthProviderConfig> = {
'im:history',
'im:read',
'users:read',
// TODO: Add 'users:read.email' once Slack app review is approved
'files:write',
'files:read',
'canvases:write',
+1
View File
@@ -270,6 +270,7 @@ export const SCOPE_DESCRIPTIONS: Record<string, string> = {
'im:history': 'Read direct message history',
'im:read': 'View direct message channels',
'users:read': 'View workspace users',
'users:read.email': 'View user email addresses',
'files:write': 'Upload files',
'files:read': 'Download and read files',
'canvases:write': 'Create canvas documents',
+1
View File
@@ -85,6 +85,7 @@ export const slackGetUserTool: ToolConfig<SlackGetUserParams, SlackGetUserRespon
first_name: profile.first_name || '',
last_name: profile.last_name || '',
title: profile.title || '',
email: profile.email || '',
phone: profile.phone || '',
skype: profile.skype || '',
is_bot: user.is_bot || false,
+1
View File
@@ -93,6 +93,7 @@ export const slackListUsersTool: ToolConfig<SlackListUsersParams, SlackListUsers
name: user.name,
real_name: user.real_name || user.profile?.real_name || '',
display_name: user.profile?.display_name || '',
email: user.profile?.email || '',
is_bot: user.is_bot || false,
is_admin: user.is_admin || false,
is_owner: user.is_owner || false,
+11
View File
@@ -376,6 +376,11 @@ export const USER_OUTPUT_PROPERTIES = {
title: { type: 'string', description: 'Job title', optional: true },
phone: { type: 'string', description: 'Phone number', optional: true },
skype: { type: 'string', description: 'Skype handle', optional: true },
email: {
type: 'string',
description: 'Email address (requires users:read.email scope)',
optional: true,
},
is_bot: { type: 'boolean', description: 'Whether the user is a bot' },
is_admin: { type: 'boolean', description: 'Whether the user is a workspace admin' },
is_owner: { type: 'boolean', description: 'Whether the user is the workspace owner' },
@@ -438,6 +443,11 @@ export const USER_SUMMARY_OUTPUT_PROPERTIES = {
name: { type: 'string', description: 'Username (handle)' },
real_name: { type: 'string', description: 'Full real name' },
display_name: { type: 'string', description: 'Display name shown in Slack' },
email: {
type: 'string',
description: 'Email address (requires users:read.email scope)',
optional: true,
},
is_bot: { type: 'boolean', description: 'Whether the user is a bot' },
is_admin: { type: 'boolean', description: 'Whether the user is a workspace admin' },
is_owner: { type: 'boolean', description: 'Whether the user is the workspace owner' },
@@ -953,6 +963,7 @@ export interface SlackUser {
title?: string
phone?: string
skype?: string
email: string
is_bot: boolean
is_admin: boolean
is_owner: boolean