list_websites
Retrieve and filter tracked websites from Umami Analytics. Use pagination, search queries, and sorting to manage your website list.
Instructions
List all websites tracked in Umami
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 websites | |
| orderBy | No | Field to order by (e.g. 'name', 'domain') |
Implementation Reference
- src/tools/websites.ts:15-23 (handler)The async handler function for the list_websites tool.
async ({ page, pageSize, query, orderBy }) => { const data = await client.call("GET", "/api/websites", undefined, { page: page, pageSize: pageSize, query, orderBy, }); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } - src/tools/websites.ts:9-14 (schema)The zod schema defining input arguments for list_websites.
{ 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 websites"), orderBy: z.string().optional().describe("Field to order by (e.g. 'name', 'domain')"), }, - src/tools/websites.ts:6-24 (registration)The registration call for the list_websites tool using the McpServer instance.
server.tool( "list_websites", "List all websites tracked in Umami", { 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 websites"), orderBy: z.string().optional().describe("Field to order by (e.g. 'name', 'domain')"), }, async ({ page, pageSize, query, orderBy }) => { const data = await client.call("GET", "/api/websites", undefined, { page: page, pageSize: pageSize, query, orderBy, }); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } );