Skip to main content
Glama

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
NameRequiredDescriptionDefault
statusNoHow the session endedexited

Implementation Reference

  • 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", }, }, }, },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/diegofornalha/sentry-mcp-cursor'

If you have feedback or need assistance with the MCP directory API, please join our Discord server