Skip to main content
Glama
diegofornalha

MCP Sentry para Cursor

sentry_finish_transaction

Complete a transaction in Sentry by setting its final status, enabling performance monitoring and error tracking for application health.

Instructions

Finish the current transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoTransaction statusok

Implementation Reference

  • The handler function that executes the sentry_finish_transaction tool. It checks if there is an active transaction, ends it using currentTransaction.end(), clears the global currentTransaction variable, and returns a confirmation message.
    case "sentry_finish_transaction": {
      const { status = "ok" } = args as any;
      
      if (!currentTransaction) {
        throw new Error("No active transaction to finish");
      }
      
      currentTransaction.end();
      currentTransaction = null;
      
      return {
        content: [
          {
            type: "text",
            text: `Transaction finished with status: ${status}`,
          },
        ],
      };
    }
  • src/index.ts:282-296 (registration)
    The registration of the sentry_finish_transaction tool in the ListTools response, including its name, description, and input schema definition.
    {
      name: "sentry_finish_transaction",
      description: "Finish the current transaction",
      inputSchema: {
        type: "object",
        properties: {
          status: {
            type: "string",
            description: "Transaction status",
            enum: ["ok", "cancelled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal_error", "unavailable", "data_loss", "unauthenticated"],
            default: "ok",
          },
        },
      },
    },
  • Global variable used to store the current Sentry transaction, shared between start_transaction and finish_transaction tools.
    let currentTransaction: any | null = null;
Behavior2/5

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

No annotations are provided, so the description carries the full burden. 'Finish' suggests a write/mutation operation, but the description doesn't disclose behavioral traits such as whether this requires specific permissions, what happens if called without an active transaction, if it's idempotent, or what side effects occur (e.g., data submission to Sentry). It adds minimal context beyond the basic action.

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—'Finish the current transaction' is front-loaded and directly conveys the core action without unnecessary details. Every word earns its place, making it highly concise and well-structured.

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 the complexity (a mutation tool with no annotations and no output schema), the description is incomplete. It lacks information on prerequisites (e.g., must have an active transaction), behavioral details (e.g., error handling, side effects), and what happens after finishing (e.g., data sent to Sentry). For a tool that likely impacts system state, this is inadequate.

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?

The input schema has 100% description coverage, with a well-documented 'status' parameter including enum values and a default. The description doesn't add any parameter semantics beyond what the schema provides (e.g., it doesn't explain what 'status' means in context or how it affects the transaction). Baseline 3 is appropriate since the schema does the heavy lifting.

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 'Finish the current transaction' clearly states the action (finish) and resource (current transaction), but it's vague about what a 'transaction' entails in this context (e.g., performance monitoring, error tracking). It distinguishes from siblings like 'sentry_start_transaction' by indicating completion vs. initiation, but lacks specificity on the transaction's purpose or scope.

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?

No explicit guidance is provided on when to use this tool versus alternatives. The description implies it should be used after starting a transaction (as inferred from sibling 'sentry_start_transaction'), but it doesn't state prerequisites, timing considerations, or when not to use it (e.g., if no transaction is active).

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