Web Vitals Time Series
rybbit_get_performance_timeseriesRetrieve Core Web Vitals performance metrics as time-series data to analyze trends and monitor website speed over specific periods.
Instructions
Get Core Web Vitals performance metrics as time-series data for trend analysis.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| siteId | Yes | Site ID (numeric ID or domain identifier) | |
| startDate | No | Start date in ISO format (YYYY-MM-DD) | |
| endDate | No | End date in ISO format (YYYY-MM-DD) | |
| timeZone | No | IANA timezone (e.g., Europe/Prague). Default: UTC | |
| filters | No | Array of filters. Example: [{parameter:'browser',type:'equals',value:['Chrome']},{parameter:'country',type:'equals',value:['US','DE']}] | |
| pastMinutesStart | No | Alternative to dates: minutes ago start (e.g., 60 = last hour) | |
| pastMinutesEnd | No | Alternative to dates: minutes ago end (default 0 = now) | |
| bucket | No | Time bucket granularity (default: day). Use 'hour' for last 24h, 'week'/'month' for long ranges |
Implementation Reference
- src/tools/performance.ts:136-169 (handler)The handler implementation for the "rybbit_get_performance_timeseries" tool, which fetches time-series performance data from the Rybbit API.
async (args) => { try { const { siteId, bucket, ...rest } = args as { siteId: string; bucket?: string; startDate?: string; endDate?: string; timeZone?: string; filters?: Array<{ parameter: string; type: string; value: (string | number)[]; }>; pastMinutesStart?: number; pastMinutesEnd?: number; }; const params = client.buildAnalyticsParams({ ...rest, bucket }); const data = await client.get<PerformanceTimeSeries[]>( `/sites/${siteId}/performance/time-series`, params ); return { content: [{ type: "text" as const, text: truncateResponse(data) }], }; } catch (err) { const message = err instanceof Error ? err.message : String(err); return { content: [{ type: "text" as const, text: `Error: ${message}` }], isError: true, }; } } - src/tools/performance.ts:119-135 (registration)Registration of the "rybbit_get_performance_timeseries" tool within the MCP server.
server.registerTool( "rybbit_get_performance_timeseries", { title: "Web Vitals Time Series", description: "Get Core Web Vitals performance metrics as time-series data for trend analysis.", annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true, destructiveHint: false, }, inputSchema: { ...analyticsInputSchema, bucket: bucketSchema, }, },