Skip to main content
Glama

sentry_add_breadcrumb

Add detailed debugging context to logs by creating breadcrumbs with custom messages, categories, severity levels, and additional data for error tracking.

Instructions

Add a breadcrumb for debugging context

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoCategory of the breadcrumb
dataNoAdditional data for the breadcrumb
levelNoSeverity levelinfo
messageYesBreadcrumb message

Implementation Reference

  • Handler for the sentry_add_breadcrumb tool. Destructures input arguments and calls Sentry.addBreadcrumb with mapped severity level, returning confirmation message.
    case "sentry_add_breadcrumb": { const { message, category, level = "info", data } = args as any; Sentry.addBreadcrumb({ message, category, level: mapSeverityLevel(level), data, timestamp: Date.now() / 1000, }); return { content: [ { type: "text", text: `Breadcrumb added: ${message}`, }, ], }; }
  • Input schema definition for sentry_add_breadcrumb tool, specifying required 'message' and optional category, level, data.
    inputSchema: { type: "object", properties: { message: { type: "string", description: "Breadcrumb message", }, category: { type: "string", description: "Category of the breadcrumb", }, level: { type: "string", enum: ["fatal", "error", "warning", "info", "debug"], description: "Severity level", default: "info", }, data: { type: "object", description: "Additional data for the breadcrumb", additionalProperties: true, }, }, required: ["message"], },
  • src/index.ts:166-193 (registration)
    Tool registration in ListToolsRequestSchema handler, defining name, description, and inputSchema for sentry_add_breadcrumb.
    name: "sentry_add_breadcrumb", description: "Add a breadcrumb for debugging context", inputSchema: { type: "object", properties: { message: { type: "string", description: "Breadcrumb message", }, category: { type: "string", description: "Category of the breadcrumb", }, level: { type: "string", enum: ["fatal", "error", "warning", "info", "debug"], description: "Severity level", default: "info", }, data: { type: "object", description: "Additional data for the breadcrumb", additionalProperties: true, }, }, required: ["message"], }, },
  • Helper function mapSeverityLevel used in sentry_add_breadcrumb handler to convert input level string to Sentry SeverityLevel.
    function mapSeverityLevel(level: string): Sentry.SeverityLevel { const severityMap: Record<string, Sentry.SeverityLevel> = { fatal: "fatal", error: "error", warning: "warning", info: "info", debug: "debug", }; return severityMap[level] || "error"; }

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