sentry_list_organization_replays
List and monitor user session replays in a Sentry organization. Analyze interactions, errors, and experience issues by retrieving specific replays using project ID, limit, and search queries.
Instructions
List replays from a Sentry organization. Monitor user sessions, interactions, errors and experience issues.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of replays to return | |
| project | No | Project ID or slug | |
| query | No | Search query |
Implementation Reference
- src/index.ts:1279-1302 (handler)Main handler for the sentry_list_organization_replays tool. Extracts input parameters, calls the API client's listReplays method, formats and returns the list of replays.case "sentry_list_organization_replays": { if (!apiClient) { throw new Error("Sentry API client not initialized. Provide auth token."); } const { project, limit = 50, query } = args as any; const params: any = { limit }; if (project) params.project = project; if (query) params.query = query; const replays = await apiClient.listReplays(params); return { content: [ { type: "text", text: `Found ${replays.length} replays:\n` + replays.map((r: any) => `- ${r.id} - ${r.user?.email || 'anonymous'} - ${r.started_at} - ${r.duration}s` ).join('\n'), }, ], }; }
- src/index.ts:629-651 (registration)Tool registration in the MCP server tools list, including name, description, and input schema definition.{ name: "sentry_list_organization_replays", description: "List replays from a Sentry organization. Monitor user sessions, interactions, errors and experience issues.", inputSchema: { type: "object", properties: { project: { type: "string", description: "Project ID or slug", }, limit: { type: "number", description: "Number of replays to return", default: 50, }, query: { type: "string", description: "Search query", }, }, required: [], }, },
- src/sentry-api-client.ts:177-180 (helper)Core API helper method that makes the HTTP request to Sentry's organization replays endpoint.async listReplays(params?: any) { const queryParams = params ? '?' + new URLSearchParams(params).toString() : ''; return this.request(`/organizations/${this.org}/replays/${queryParams}`); }
- src/types.ts:370-418 (schema)TypeScript interface defining the structure of a Sentry replay object, used for response typing.export interface SentryReplay { activity: number; browser: { name: string; version: string; }; count_dead_clicks: number; count_rage_clicks: number; count_errors: number; count_segments: number; count_urls: number; device: { brand: string; family: string; model: string; name: string; } | null; dist: string | null; duration: number; environment: string; error_ids: string[]; finished_at: string; has_viewed: boolean; id: string; is_archived: boolean | null; os: { name: string; version: string; } | null; platform: string; project_id: string; releases: string[]; sdk: { name: string; version: string; }; started_at: string; tags: Record<string, string[]>; trace_ids: string[]; urls: string[]; user: { display_name: string; email: string; id: string; ip: string; username: string; } | null; }