Claude
Skills
Sign in
Back

sentry-helper

Included with Lifetime
$97 forever

Complete Sentry operations via sentry-cli and REST API - issues, releases, source maps, traces, events When user mentions Sentry, errors, issues, releases, source maps, error tracking, stack traces

Backend & APIs

What this skill does


# Sentry Helper Agent

## Overview

Complete Sentry operations via `sentry-cli` and REST API. This skill replaces Sentry MCP server functionality, providing CLI/API equivalents for all operations.

## MCP Tool Equivalents Reference

| MCP Tool                  | CLI/API Equivalent                                                         |
| ------------------------- | -------------------------------------------------------------------------- |
| `whoami`                  | `sentry-cli info` or `curl "$API/"`                                        |
| `find_organizations`      | `sentry-cli organizations list` or `curl "$API/organizations/"`            |
| `find_teams`              | `curl "$API/organizations/{org}/teams/"`                                   |
| `find_projects`           | `sentry-cli projects list` or `curl "$API/organizations/{org}/projects/"`  |
| `find_releases`           | `sentry-cli releases list` or `curl "$API/organizations/{org}/releases/"`  |
| `get_issue_details`       | `curl "$API/issues/{id}/"`                                                 |
| `get_trace_details`       | `curl "$API/organizations/{org}/events-trace/{trace_id}/"`                 |
| `get_event_attachment`    | `curl "$API/projects/{org}/{project}/events/{event_id}/attachments/"`      |
| `search_events`           | `curl "$API/organizations/{org}/events/"`                                  |
| `search_issues`           | `sentry-cli issues list` or `curl "$API/projects/{org}/{project}/issues/"` |
| `search_issue_events`     | `curl "$API/issues/{id}/events/"`                                          |
| `find_dsns`               | `curl "$API/projects/{org}/{project}/keys/"`                               |
| `update_issue`            | `curl -X PUT "$API/issues/{id}/"`                                          |
| `create_team`             | `curl -X POST "$API/organizations/{org}/teams/"`                           |
| `create_project`          | `curl -X POST "$API/teams/{org}/{team}/projects/"`                         |
| `update_project`          | `curl -X PUT "$API/projects/{org}/{project}/"`                             |
| `create_dsn`              | `curl -X POST "$API/projects/{org}/{project}/keys/"`                       |
| `search_docs`             | WebSearch or https://docs.sentry.io                                        |
| `get_doc`                 | WebFetch from docs.sentry.io                                               |
| `analyze_issue_with_seer` | Manual analysis + get_issue_details                                        |

## Configuration

### CLI Installation

```bash
# macOS
brew install getsentry/tools/sentry-cli

# Linux/Windows
curl -sL https://sentry.io/get-cli/ | sh

# npm
npm install -g @sentry/cli
```

### Authentication

```bash
# Set environment variables
export SENTRY_AUTH_TOKEN="your-auth-token"
export SENTRY_ORG="your-org"
export SENTRY_PROJECT="your-project"
export API="https://sentry.io/api/0"

# Auth header
AUTH="Authorization: Bearer $SENTRY_AUTH_TOKEN"

# CLI login (interactive)
sentry-cli login

# Verify authentication
sentry-cli info
curl -H "$AUTH" "$API/"
```

### .sentryclirc File

```ini
[defaults]
url=https://sentry.io/
org=my-organization
project=my-project

[auth]
token=your-auth-token

[log]
level=info
```

---

## Organization Operations

### Get Current User (whoami)

```bash
# Via CLI
sentry-cli info

# Via API
curl -H "$AUTH" "$API/"

# Get user details
curl -H "$AUTH" "$API/users/me/"
```

### List Organizations

```bash
# Via CLI
sentry-cli organizations list

# Via API
curl -H "$AUTH" "$API/organizations/"

# JSON output
curl -H "$AUTH" "$API/organizations/" | \
  jq '.[] | {slug, name, status}'
```

---

## Team Operations

### List Teams

```bash
curl -H "$AUTH" "$API/organizations/$ORG/teams/"

# JSON output
curl -H "$AUTH" "$API/organizations/$ORG/teams/" | \
  jq '.[] | {slug, name, memberCount}'
```

### Create Team

```bash
curl -X POST -H "$AUTH" -H "Content-Type: application/json" \
  "$API/organizations/$ORG/teams/" \
  -d '{
    "name": "My Team",
    "slug": "my-team"
  }'
```

---

## Project Operations

### List Projects

```bash
# Via CLI
sentry-cli projects list

# Via API
curl -H "$AUTH" "$API/organizations/$ORG/projects/"

# JSON output
curl -H "$AUTH" "$API/organizations/$ORG/projects/" | \
  jq '.[] | {slug, name, platform}'
```

### Create Project

```bash
# Create project under a team
curl -X POST -H "$AUTH" -H "Content-Type: application/json" \
  "$API/teams/$ORG/$TEAM/projects/" \
  -d '{
    "name": "My Project",
    "slug": "my-project",
    "platform": "javascript"
  }'
```

### Update Project

```bash
curl -X PUT -H "$AUTH" -H "Content-Type: application/json" \
  "$API/projects/$ORG/$PROJECT/" \
  -d '{
    "name": "Updated Project Name",
    "slug": "updated-slug",
    "platform": "python"
  }'
```

---

## Issue Operations

### Search Issues

```bash
# Via CLI
sentry-cli issues list
sentry-cli issues list --query "is:unresolved"

# Via API
curl -H "$AUTH" "$API/projects/$ORG/$PROJECT/issues/"

# With query filters
curl -G -H "$AUTH" \
  --data-urlencode "query=is:unresolved level:error" \
  "$API/projects/$ORG/$PROJECT/issues/"

# Search across organization
curl -G -H "$AUTH" \
  --data-urlencode "query=is:unresolved" \
  "$API/organizations/$ORG/issues/"

# JSON output
curl -H "$AUTH" "$API/projects/$ORG/$PROJECT/issues/" | \
  jq '.[] | {id, shortId, title, count, userCount}'
```

### Get Issue Details

```bash
# By issue ID
curl -H "$AUTH" "$API/issues/$ISSUE_ID/"

# With full details
curl -H "$AUTH" "$API/issues/$ISSUE_ID/" | \
  jq '{
    id,
    shortId,
    title,
    status,
    level,
    count,
    userCount,
    firstSeen,
    lastSeen,
    platform,
    project: .project.slug
  }'

# Get latest event with stacktrace
curl -H "$AUTH" "$API/issues/$ISSUE_ID/events/latest/" | \
  jq '.entries[] | select(.type == "exception")'
```

### Update Issue

```bash
# Resolve issue
curl -X PUT -H "$AUTH" -H "Content-Type: application/json" \
  "$API/issues/$ISSUE_ID/" \
  -d '{"status": "resolved"}'

# Ignore issue
curl -X PUT -H "$AUTH" -H "Content-Type: application/json" \
  "$API/issues/$ISSUE_ID/" \
  -d '{"status": "ignored"}'

# Assign to user
curl -X PUT -H "$AUTH" -H "Content-Type: application/json" \
  "$API/issues/$ISSUE_ID/" \
  -d '{"assignedTo": "user:123456"}'

# Assign to team
curl -X PUT -H "$AUTH" -H "Content-Type: application/json" \
  "$API/issues/$ISSUE_ID/" \
  -d '{"assignedTo": "team:789"}'
```

### Search Issue Events

```bash
# Get events for an issue
curl -H "$AUTH" "$API/issues/$ISSUE_ID/events/"

# With pagination
curl -H "$AUTH" "$API/issues/$ISSUE_ID/events/?cursor=0:0:1"

# Get specific event
curl -H "$AUTH" "$API/issues/$ISSUE_ID/events/$EVENT_ID/"
```

---

## Event Operations

### Search Events

```bash
# Events in organization (Discover)
curl -G -H "$AUTH" \
  --data-urlencode "field=title" \
  --data-urlencode "field=event.type" \
  --data-urlencode "field=project" \
  --data-urlencode "field=timestamp" \
  --data-urlencode "query=level:error" \
  --data-urlencode "statsPeriod=24h" \
  "$API/organizations/$ORG/events/"

# Count events
curl -G -H "$AUTH" \
  --data-urlencode "field=count()" \
  --data-urlencode "query=level:error" \
  --data-urlencode "statsPeriod=24h" \
  "$API/organizations/$ORG/events/"
```

### Get Event Attachments

```bash
# List attachments for an event
curl -H "$AUTH" \
  "$API/projects/$ORG/$PROJECT/events/$EVENT_ID/attachments/"

# Download specific attachment
curl -H "$AUTH" \
  "$API/projects/$ORG/$PROJECT/events/$EVENT_ID/attachments/$ATTACHMENT_ID/?download=1"
```

---

## Trace Operations

### Get Trace Details

```bash
# Get full trace
curl -H "$AUTH" \
  "$API/organizations/$ORG/events-trace/$TRACE_ID/"

# With specific project
curl -H "$AUTH" \
  "$API/organizations/$ORG/events-trace/$TRACE_ID/?project=$PROJECT_ID"
```

---

## Release Operations

### List Releases

```bash
# Via CLI
sentry-cli r

Related in Backend & APIs