Skip to main content
Glama

sentry_set_context

Add custom context data to Sentry error reports to provide additional debugging information and improve issue resolution in application monitoring.

Instructions

Set custom context data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesContext name
contextYesContext data

Implementation Reference

  • The handler logic for the 'sentry_set_context' tool. It extracts the context name and data from input arguments and calls Sentry.setContext to set custom context data on the current scope.
    case "sentry_set_context": { const { name: contextName, context } = args as any; Sentry.setContext(contextName, context); return { content: [ { type: "text", text: `Context set: ${contextName}`, }, ], }; }
  • src/index.ts:242-259 (registration)
    Registration of the 'sentry_set_context' tool in the tools array passed to server.setTools(), including its name, description, and input schema.
    name: "sentry_set_context", description: "Set custom context data", inputSchema: { type: "object", properties: { name: { type: "string", description: "Context name", }, context: { type: "object", description: "Context data", additionalProperties: true, }, }, required: ["name", "context"], }, },
  • Input schema defining the parameters for the 'sentry_set_context' tool: name (string) and context (object).
    inputSchema: { type: "object", properties: { name: { type: "string", description: "Context name", }, context: { type: "object", description: "Context data", additionalProperties: true, }, }, required: ["name", "context"], },

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