Skip to main content
Glama

sentry_set_user

Set user context in Sentry to track errors and performance by user ID, email, IP address, and segment for better debugging and monitoring.

Instructions

Set user context for Sentry

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoUser ID
emailNoUser email
usernameNoUsername
ip_addressNoUser IP address
segmentNoUser segment

Implementation Reference

  • Handler for the 'sentry_set_user' tool. Extracts user information from arguments and sets it as the current user context in Sentry using Sentry.setUser(). Returns a confirmation message.
    case "sentry_set_user": { const userInfo = args as any; Sentry.setUser(userInfo); return { content: [ { type: "text", text: `User context set: ${JSON.stringify(userInfo)}`, }, ], }; }
  • src/index.ts:194-222 (registration)
    Tool registration in the ListTools response, defining the name, description, and input schema for 'sentry_set_user'.
    { name: "sentry_set_user", description: "Set user context for Sentry", inputSchema: { type: "object", properties: { id: { type: "string", description: "User ID", }, email: { type: "string", description: "User email", }, username: { type: "string", description: "Username", }, ip_address: { type: "string", description: "User IP address", }, segment: { type: "string", description: "User segment", }, }, }, },
  • Input schema definition for the 'sentry_set_user' tool, specifying optional properties for user context.
    inputSchema: { type: "object", properties: { id: { type: "string", description: "User ID", }, email: { type: "string", description: "User email", }, username: { type: "string", description: "Username", }, ip_address: { type: "string", description: "User IP address", }, segment: { type: "string", description: "User segment", }, }, }, },

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