list_users
Retrieve and manage user accounts with pagination, search, and sorting options for administrative oversight.
Instructions
List all users (admin only)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (1-based) | |
| pageSize | No | Results per page (default 10) | |
| query | No | Search query to filter users | |
| orderBy | No | Field to order by (e.g. 'username', 'createdAt') |
Implementation Reference
- src/tools/users.ts:15-23 (handler)The handler implementation for the list_users tool, which calls the Umami API GET /api/users endpoint.
async ({ page, pageSize, query, orderBy }) => { const data = await client.call("GET", "/api/users", undefined, { page, pageSize, query, orderBy, }); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } - src/tools/users.ts:6-14 (registration)The tool registration and schema definition for list_users.
server.tool( "list_users", "List all users (admin only)", { page: z.number().optional().describe("Page number (1-based)"), pageSize: z.number().optional().describe("Results per page (default 10)"), query: z.string().optional().describe("Search query to filter users"), orderBy: z.string().optional().describe("Field to order by (e.g. 'username', 'createdAt')"), },