| name | sentry |
| description | Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry CLI; perform read-only queries using the `sentry` command. |
Sentry (Read-only Observability)
Quick start
- If not already authenticated, ask the user to run
sentry auth login or set SENTRY_AUTH_TOKEN as an env var.
- The CLI auto-detects org/project from DSNs in
.env files, source code, config defaults, and directory names. Only specify <org>/<project> if auto-detection fails or picks the wrong target.
- Defaults: time range
24h, environment production, limit 20.
- Always use
--json when processing output programmatically. Use --json --fields to select specific fields and reduce output size.
- Use
sentry schema <resource> to discover API endpoints quickly.
If the CLI is not installed, give the user these steps:
- Install the Sentry CLI:
curl https://cli.sentry.dev/install -fsS | bash
- Authenticate:
sentry auth login
- Confirm authentication:
sentry auth status
- Never ask the user to paste the full token in chat. Ask them to set it locally and confirm when ready.
Core tasks (use Sentry CLI)
Use the sentry CLI for all queries. It handles authentication, org/project detection, pagination, and retries automatically. Use --json for machine-readable output.
1) List issues (ordered by most recent)
sentry issue list \
--query "is:unresolved environment:production" \
--period 24h \
-- 20 \
--json --fields shortId,title,priority,level,status