analytics
Sentry CLI for AI Agents
Use the Sentry CLI from KosmoKrator to call Sentry tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Sentry CLI Setup
Sentry can be configured headlessly with `kosmokrator integrations:configure sentry`.
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
# Configure and verify this integration.
kosmokrator integrations:configure sentry --set auth_token="$SENTRY_AUTH_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor sentry --json
kosmokrator integrations:status --json Credentials
Authentication type: API token api_token. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
auth_token | SENTRY_AUTH_TOKEN | Secret secret | yes | Auth Token |
url | SENTRY_URL | URL url | no | Sentry API URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call sentry.sentry_list_projects '{"query":"example_query"}' --json kosmo integrations:sentry sentry_list_projects '{"query":"example_query"}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs sentry --json
kosmo integrations:docs sentry.sentry_list_projects --json
kosmo integrations:schema sentry.sentry_list_projects --json
kosmo integrations:search "Sentry" --json
kosmo integrations:list --json Automation Contexts
The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.
CLI Functions
Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.
sentry.sentry_list_projects
List all Sentry projects accessible to the authenticated user. Returns project slugs, organization slugs, and platforms for use in other Sentry tools.
read - Parameters
- query
kosmo integrations:call sentry.sentry_list_projects '{"query":"example_query"}' --json kosmo integrations:sentry sentry_list_projects '{"query":"example_query"}' --json sentry.sentry_get_project
Get detailed information about a specific Sentry project, including its slug, platform, team assignments, and error statistics.
read - Parameters
- org_slug, project_slug
kosmo integrations:call sentry.sentry_get_project '{"org_slug":"example_org_slug","project_slug":"example_project_slug"}' --json kosmo integrations:sentry sentry_get_project '{"org_slug":"example_org_slug","project_slug":"example_project_slug"}' --json sentry.sentry_list_issues
List issues (errors) for a specific Sentry project. Supports filtering by status, query, sorting, and time range. Returns issue IDs, titles, counts, and severity.
read - Parameters
- org_slug, project_slug, query, sort, limit
kosmo integrations:call sentry.sentry_list_issues '{"org_slug":"example_org_slug","project_slug":"example_project_slug","query":"example_query","sort":"example_sort","limit":1}' --json kosmo integrations:sentry sentry_list_issues '{"org_slug":"example_org_slug","project_slug":"example_project_slug","query":"example_query","sort":"example_sort","limit":1}' --json sentry.sentry_get_issue
Get detailed information about a specific Sentry issue, including the error message, stacktrace, tags, event count, and affected users.
read - Parameters
- issue_id
kosmo integrations:call sentry.sentry_get_issue '{"issue_id":"example_issue_id"}' --json kosmo integrations:sentry sentry_get_issue '{"issue_id":"example_issue_id"}' --json sentry.sentry_list_releases
List releases for a specific Sentry project. Returns version strings, deployment dates, authors, and commit information.
read - Parameters
- org_slug, project_slug, limit
kosmo integrations:call sentry.sentry_list_releases '{"org_slug":"example_org_slug","project_slug":"example_project_slug","limit":1}' --json kosmo integrations:sentry sentry_list_releases '{"org_slug":"example_org_slug","project_slug":"example_project_slug","limit":1}' --json sentry.sentry_create_issue
Create a new issue (user report or crash report) in a Sentry project. Requires the error message and optional metadata like stacktrace, tags, and user context.
write - Parameters
- org_slug, project_slug, title, message, level, tags, extra
kosmo integrations:call sentry.sentry_create_issue '{"org_slug":"example_org_slug","project_slug":"example_project_slug","title":"example_title","message":"example_message","level":"example_level","tags":"example_tags","extra":"example_extra"}' --json kosmo integrations:sentry sentry_create_issue '{"org_slug":"example_org_slug","project_slug":"example_project_slug","title":"example_title","message":"example_message","level":"example_level","tags":"example_tags","extra":"example_extra"}' --json sentry.sentry_get_current_user
Get the currently authenticated Sentry user. Returns user name, email, and organization memberships. Useful for verifying the connection and identifying which Sentry account is being used.
read - Parameters
- none
kosmo integrations:call sentry.sentry_get_current_user '{}' --json kosmo integrations:sentry sentry_get_current_user '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
sentry.sentry_list_projects 1 parameters
kosmo integrations:schema sentry.sentry_list_projects --json | Parameter | Type | Required | Description |
|---|---|---|---|
query | string | no | Filter projects by name or slug. |
sentry.sentry_get_project 2 parameters
kosmo integrations:schema sentry.sentry_get_project --json | Parameter | Type | Required | Description |
|---|---|---|---|
org_slug | string | yes | The organization slug (e.g., "my-org"). |
project_slug | string | yes | The project slug (e.g., "my-project"). |
sentry.sentry_list_issues 5 parameters
kosmo integrations:schema sentry.sentry_list_issues --json | Parameter | Type | Required | Description |
|---|---|---|---|
org_slug | string | yes | The organization slug (e.g., "my-org"). |
project_slug | string | yes | The project slug (e.g., "my-project"). |
query | string | no | Search query to filter issues (e.g., "is:unresolved level:error"). |
sort | string | no | Sort order: "date" (default), "freq", "new", "priority". |
limit | integer | no | Maximum number of issues to return (default: 25, max: 100). |
sentry.sentry_get_issue 1 parameters
kosmo integrations:schema sentry.sentry_get_issue --json | Parameter | Type | Required | Description |
|---|---|---|---|
issue_id | string | yes | The Sentry issue ID (e.g., "1234567890"). |
sentry.sentry_list_releases 3 parameters
kosmo integrations:schema sentry.sentry_list_releases --json | Parameter | Type | Required | Description |
|---|---|---|---|
org_slug | string | yes | The organization slug (e.g., "my-org"). |
project_slug | string | yes | The project slug (e.g., "my-project"). |
limit | integer | no | Maximum number of releases to return (default: 25, max: 100). |
sentry.sentry_create_issue 7 parameters
kosmo integrations:schema sentry.sentry_create_issue --json | Parameter | Type | Required | Description |
|---|---|---|---|
org_slug | string | yes | The organization slug (e.g., "my-org"). |
project_slug | string | yes | The project slug (e.g., "my-project"). |
title | string | yes | Short description of the issue (the error message or title). |
message | string | no | Full error message or stacktrace. |
level | string | no | Severity level: "fatal", "error", "warning", "info", or "debug". Defaults to "error". |
tags | object | no | Key-value tags to attach to the issue (e.g., {"environment": "production", "version": "1.0.0"}). |
extra | object | no | Additional context data as key-value pairs. |
sentry.sentry_get_current_user 0 parameters
kosmo integrations:schema sentry.sentry_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
Permissions
Headless calls still follow the integration read/write permission policy. Configure read/write defaults with
integrations:configure. Add --force only for trusted automation that should bypass that policy.