Skip to main content
Glama
mikusnuz

umami-mcp

get_sessions_weekly

Retrieve weekly session analytics data for a specific website to track user engagement patterns over time.

Instructions

Get weekly session data for a website

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
websiteIdYesWebsite UUID
startAtYesStart timestamp in milliseconds
endAtYesEnd timestamp in milliseconds

Implementation Reference

  • The "get_sessions_weekly" tool is defined and registered within the `registerStatsTools` function in `src/tools/stats.ts`. It takes a `websiteId` and `dateRange` as inputs and calls the Umami API to fetch weekly session data.
    server.tool(
      "get_sessions_weekly",
      "Get weekly session data for a website",
      {
        websiteId: z.string().describe("Website UUID"),
        ...dateRange,
      },
      async ({ websiteId, startAt, endAt }) => {
        const data = await client.call("GET", `/api/websites/${websiteId}/sessions/weekly`, undefined, {
          startAt,
          endAt,
        });
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
      }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mikusnuz/umami-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server