KosmoKrator

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, configure, and verify
# 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.

KeyEnv varTypeRequiredLabel
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.

Generic CLI call
kosmo integrations:call sentry.sentry_list_projects '{"query":"example_query"}' --json
Provider shortcut
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.

Discovery commands
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 read
Parameters
query
Generic call
kosmo integrations:call sentry.sentry_list_projects '{"query":"example_query"}' --json
Shortcut
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 read
Parameters
org_slug, project_slug
Generic call
kosmo integrations:call sentry.sentry_get_project '{"org_slug":"example_org_slug","project_slug":"example_project_slug"}' --json
Shortcut
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 read
Parameters
org_slug, project_slug, query, sort, limit
Generic call
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
Shortcut
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 read
Parameters
issue_id
Generic call
kosmo integrations:call sentry.sentry_get_issue '{"issue_id":"example_issue_id"}' --json
Shortcut
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 read
Parameters
org_slug, project_slug, limit
Generic call
kosmo integrations:call sentry.sentry_list_releases '{"org_slug":"example_org_slug","project_slug":"example_project_slug","limit":1}' --json
Shortcut
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 write
Parameters
org_slug, project_slug, title, message, level, tags, extra
Generic call
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
Shortcut
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 read
Parameters
none
Generic call
kosmo integrations:call sentry.sentry_get_current_user '{}' --json
Shortcut
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
Schema command
kosmo integrations:schema sentry.sentry_list_projects --json
ParameterTypeRequiredDescription
query string no Filter projects by name or slug.
sentry.sentry_get_project 2 parameters
Schema command
kosmo integrations:schema sentry.sentry_get_project --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema sentry.sentry_list_issues --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema sentry.sentry_get_issue --json
ParameterTypeRequiredDescription
issue_id string yes The Sentry issue ID (e.g., "1234567890").
sentry.sentry_list_releases 3 parameters
Schema command
kosmo integrations:schema sentry.sentry_list_releases --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema sentry.sentry_create_issue --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema sentry.sentry_get_current_user --json
ParameterTypeRequiredDescription
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.