Skip to main content
Glama
diegofornalha

MCP Sentry para Cursor

sentry_start_session

Start a new session to monitor release health by tracking user activity with unique identifiers, session IDs, release versions, and environment data.

Instructions

Start a new session for release health monitoring

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
distinctIdNoUnique user identifier (ID, email, or username)
sessionIdNoOptional custom session ID
releaseNoRelease version
environmentNoEnvironment name (production, staging, etc)

Implementation Reference

  • The switch case handler that executes the sentry_start_session tool. It destructures the arguments, prepares session data, optionally sets the user, calls Sentry.startSession, and returns a confirmation message.
    case "sentry_start_session": {
      const { distinctId, sessionId, release, environment } = args as any;
      
      // Start a new session
      const sessionData: any = {
        release,
        environment,
      };
      
      if (distinctId) {
        Sentry.setUser({ id: distinctId });
      }
      
      Sentry.startSession(sessionData);
      
      return {
        content: [
          {
            type: "text",
            text: `Session started${sessionId ? ` with ID: ${sessionId}` : ''}`,
          },
        ],
      };
    }
  • src/index.ts:297-321 (registration)
    Tool registration in the ListToolsRequestSchema handler, including the tool name, description, and input schema definition.
    {
      name: "sentry_start_session",
      description: "Start a new session for release health monitoring",
      inputSchema: {
        type: "object",
        properties: {
          distinctId: {
            type: "string",
            description: "Unique user identifier (ID, email, or username)",
          },
          sessionId: {
            type: "string",
            description: "Optional custom session ID",
          },
          release: {
            type: "string",
            description: "Release version",
          },
          environment: {
            type: "string",
            description: "Environment name (production, staging, etc)",
          },
        },
      },
    },
  • Input schema definition for the sentry_start_session tool, specifying properties for distinctId, sessionId, release, and environment.
    {
      name: "sentry_start_session",
      description: "Start a new session for release health monitoring",
      inputSchema: {
        type: "object",
        properties: {
          distinctId: {
            type: "string",
            description: "Unique user identifier (ID, email, or username)",
          },
          sessionId: {
            type: "string",
            description: "Optional custom session ID",
          },
          release: {
            type: "string",
            description: "Release version",
          },
          environment: {
            type: "string",
            description: "Environment name (production, staging, etc)",
          },
        },
      },
    },
Behavior2/5

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

With no annotations provided, the description carries full burden but lacks behavioral details. It doesn't disclose whether this is a read/write operation, permission requirements, side effects (e.g., creating session data), rate limits, or what happens if called multiple times for the same session.

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—front-loaded with the core action and purpose. Every word earns its place without redundancy or 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?

For a tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral traits, usage context, and expected outcomes, making it inadequate for an AI agent to fully understand how to invoke it correctly in Sentry's session management workflow.

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%, so the schema fully documents all 4 parameters. The description adds no additional parameter semantics beyond implying session creation involves release health monitoring, which is minimal value. Baseline 3 is appropriate when schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the action ('Start a new session') and purpose ('for release health monitoring'), distinguishing it from siblings like 'sentry_end_session' or 'sentry_capture_session'. However, it doesn't explicitly differentiate from all siblings (e.g., 'sentry_start_transaction' also starts something).

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 like 'sentry_end_session' or 'sentry_capture_session', nor does it mention prerequisites or timing considerations for session management in Sentry's ecosystem.

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