Skip to main content
Glama
diegofornalha

MCP Sentry para Cursor

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"],
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. 'Set custom context data' implies a write operation but doesn't disclose behavioral traits like whether it's idempotent, requires specific permissions, has side effects, or how it interacts with other Sentry features. This leaves significant gaps for an agent to understand its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's front-loaded and appropriately sized for a simple tool, making it easy to parse quickly without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a tool that likely involves mutation (setting data), the description is incomplete. It doesn't cover return values, error conditions, or how it fits into the broader Sentry context, leaving agents with insufficient information for reliable use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for 'name' and 'context' parameters. The description adds no meaning beyond the schema, as it doesn't explain what constitutes valid context data or examples. With high schema coverage, the baseline is 3, and the description doesn't compensate with additional insights.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Set custom context data' clearly states the action (set) and resource (context data), but it's vague about what 'context data' means in the Sentry ecosystem and doesn't differentiate from siblings like sentry_set_tag or sentry_set_user, which also set data. It's better than a tautology but lacks specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context in which it's applicable (e.g., during error tracking), or how it relates to siblings like sentry_set_tag. Without such information, agents may struggle to select it appropriately.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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