Skip to main content
Glama
mikusnuz

umami-mcp

get_events

Retrieve website event data for specified time periods to analyze user interactions and track engagement metrics.

Instructions

Get event data for a website over time

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
websiteIdYesWebsite UUID
startAtYesStart timestamp in milliseconds
endAtYesEnd timestamp in milliseconds
unitYesTime grouping unit
timezoneNoTimezone (e.g. 'Asia/Seoul')
urlNoFilter by URL path

Implementation Reference

  • The "get_events" tool is defined and registered within the `registerStatsTools` function in `src/tools/stats.ts`. It takes a website ID, date range, unit, timezone, and optional URL filter as inputs, and fetches data from the `/api/websites/${websiteId}/events` endpoint.
    server.tool(
      "get_events",
      "Get event data for a website over time",
      {
        websiteId: z.string().describe("Website UUID"),
        ...dateRange,
        unit: z.enum(["hour", "day", "week", "month", "year"]).describe("Time grouping unit"),
        timezone: z.string().optional().describe("Timezone (e.g. 'Asia/Seoul')"),
        url: z.string().optional().describe("Filter by URL path"),
      },
      async ({ websiteId, startAt, endAt, unit, timezone, url }) => {
        const data = await client.call("GET", `/api/websites/${websiteId}/events`, undefined, {
          startAt,
          endAt,
          unit,
          timezone,
          url,
        });
        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