sentry_end_session
End the current Cursor Sentry session with specified status, such as exited, crashed, abnormal, or errored, to monitor application health and error handling.
Instructions
End the current session with a specific status
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | How the session ended | exited |
Implementation Reference
- src/index.ts:924-945 (handler)The main handler for the 'sentry_end_session' tool. It ends the current Sentry session using Sentry.endSession(), handles special statuses by capturing exceptions or messages if crashed or abnormal, and returns a confirmation message.case "sentry_end_session": { const { status = "exited" } = args as any; // End the current session Sentry.endSession(); // If status is crashed or abnormal, capture it if (status === "crashed") { Sentry.captureException(new Error("Session ended with crash")); } else if (status === "abnormal") { Sentry.captureMessage("Session ended abnormally", "warning"); } return { content: [ { type: "text", text: `Session ended with status: ${status}`, }, ], }; }
- src/index.ts:322-336 (registration)Registration of the 'sentry_end_session' tool in the MCP tools array, including its name, description, and input schema definition.{ name: "sentry_end_session", description: "End the current session with a specific status", inputSchema: { type: "object", properties: { status: { type: "string", enum: ["exited", "crashed", "abnormal", "errored"], description: "How the session ended", default: "exited", }, }, }, },