show_users
List all users in your Anaplan tenant with optional sorting, search by name or ID, and limit results.
Instructions
List all users in the tenant
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Sort field (e.g., '%2BemailAddress' for ascending email) | |
| limit | No | Max items to return (default 50, max 1000) | |
| search | No | Filter by name or ID (case-insensitive substring match) |
Implementation Reference
- src/tools/exploration.ts:607-618 (handler)The 'show_users' tool handler. Calls apis.users.list(sort) and formats results as a table with Name, Email, Active, and ID columns, supporting limit and search pagination.
server.tool("show_users", "List all users in the tenant", { sort: z.string().optional().describe("Sort field (e.g., '%2BemailAddress' for ascending email)"), ...paginationParams, }, async ({ sort, limit, search }) => { const users = await apis.users.list(sort); return tableResult(users, [ { header: "Name", key: "firstName" }, { header: "Email", key: "email" }, { header: "Active", key: "active" }, { header: "ID", key: "id" }, ], "users", { limit, search }); }); - src/tools/exploration.ts:40-43 (schema)The paginationParams schema used by show_users, defining optional 'limit' and 'search' parameters.
const paginationParams = { limit: z.number().optional().describe("Max items to return (default 50, max 1000)"), search: z.string().optional().describe("Filter by name or ID (case-insensitive substring match)"), }; - src/tools/exploration.ts:607-609 (schema)The tool's input schema including optional 'sort' parameter and spread paginationParams.
server.tool("show_users", "List all users in the tenant", { sort: z.string().optional().describe("Sort field (e.g., '%2BemailAddress' for ascending email)"), ...paginationParams, - src/server.ts:54-57 (registration)Registration of exploration tools (including show_users) via registerExplorationTools. The users API is passed as part of the apis object.
registerExplorationTools(server, { workspaces, models, modules, lists, imports, exports, processes, files, actions, transactional, modelManagement, dimensions, calendar, versions, users, }, resolver); - src/api/users.ts:16-19 (helper)The UsersApi.list() method — the underlying API helper that performs the HTTP GET to /users endpoint with optional sort parameter.
async list(sort?: string) { const suffix = sort ? `?sort=${sort}` : ""; return this.client.getAll<any>(`/users${suffix}`, ["users", "user"]); }