List Users

Lists all users in a Slack workspace

Usage #

// Import the typed helper
import { listUsers } from "@hotglue/sdk/slack";
const result = await client.execute({
...listUsers({
limit: int,
cursor: string,
include_locale: bool,
}),
userId: "user_123",
});
// result is typed as ListUsersOutput
const result = await client.execute({
integration: "slack",
tool: "list_users",
userId: "user_123",
input: {
limit: int,
cursor: string,
include_locale: bool,
},
});
// The agent will automatically use this tool when needed
const agent = new Agent({
tools: () => hotglueTools({
integrations: ["slack"],
userId: "user_123",
}),
});
await agent.generate("run the List Users tool");

Required Permissions #

users:read

Input Schema #

limit int

Maximum number of users to return (max 1000)

default: 100
cursor string

Pagination cursor

include_locale bool

Include locale info for each user

default: false

Output Schema #

ok bool required
members object[]
response_metadata object

This tool calls: #

GET https://slack.com/api/users.list