run_report
Execute analytics reports for websites to analyze funnel, retention, UTM, goals, insights, revenue, journey, or attribution data.
Instructions
Execute a report by type and get results (funnel, retention, utm, goals, insights, revenue, journey, attribution)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Report type to run | |
| websiteId | Yes | Website UUID | |
| parameters | Yes | Report-specific parameters (varies by type) |
Implementation Reference
- src/tools/reports.ts:101-118 (handler)The `run_report` tool is defined here using the MCP server tool registration, with its handler function implemented as an asynchronous callback that calls the Umami client.
server.tool( "run_report", "Execute a report by type and get results (funnel, retention, utm, goals, insights, revenue, journey, attribution)", { type: z .enum(["funnel", "retention", "utm", "goals", "insights", "revenue", "journey", "attribution"]) .describe("Report type to run"), websiteId: z.string().describe("Website UUID"), parameters: z .record(z.unknown()) .describe("Report-specific parameters (varies by type)"), }, async ({ type, websiteId, parameters }) => { const body: Record<string, unknown> = { websiteId, ...parameters }; const data = await client.call("POST", `/api/reports/${type}`, body); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } );