get_session
Retrieve detailed analytics data for a specific user session by providing website and session identifiers.
Instructions
Get details of a specific session
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| websiteId | Yes | Website UUID | |
| sessionId | Yes | Session UUID |
Implementation Reference
- src/tools/sessions.ts:13-19 (handler)Handler function for get_session, which calls the Umami API to fetch session details.
async ({ websiteId, sessionId }) => { const data = await client.call( "GET", `/api/websites/${websiteId}/sessions/${sessionId}` ); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } - src/tools/sessions.ts:6-20 (registration)Tool registration for "get_session" within the McpServer.
server.tool( "get_session", "Get details of a specific session", { websiteId: z.string().describe("Website UUID"), sessionId: z.string().describe("Session UUID"), }, async ({ websiteId, sessionId }) => { const data = await client.call( "GET", `/api/websites/${websiteId}/sessions/${sessionId}` ); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } );