Home / Servers / Sentry API / list_organization_stats_v2

Retrieve Event Counts for an Organization (v2)

An MCP tool from the Sentry API server, hosted on mcp.hjlabs.in.

Retrieve Event Counts for an Organization (v2) Query event counts for your Organization. Select a field, define a date range, and group or filter by columns. [GET /api/0/organizations/{organization_id_or_slug}/stats_v2/]

Name on the gateway: sentry_api__list_organization_stats_v2 · read-only.

Parameters

NameTypeDescription
organization_id_or_slug requiredstringThe ID or slug of the organization the resource belongs to.
groupBy requiredarraycan pass multiple groupBy parameters to group by multiple, e.g.…
field requiredsum(quantity) | sum(times_seen)the sum(quantity) field is bytes for attachments, and all others the 'event'…
statsPeriodstringThis defines the range of the time series, relative to now. The range is given…
intervalstringThis is the resolution of the time series, given in the same format as…
startstringThis defines the start of the time series range as an explicit datetime…
endstringThis defines the inclusive end of the time series range as an explicit…
projectarrayThe ID of the projects to filter by. Use -1 to include all accessible projects.
categoryerror | transaction | attachment | replay | profile | profile_duration | profile_duration_ui | profile_chunk | profile_chunk_ui | monitorFilter by data category. Each category represents a different type of data…
outcomeaccepted | filtered | rate_limited | invalid | abuse | client_discard | cardinality_limitedSee https://docs.sentry.io/product/stats/ for more information on outcome…
reasonstringThe reason field will contain why an event was filtered/dropped.

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "sentry_api__list_organization_stats_v2",
  "arguments": {
    "organization_id_or_slug": "…",
    "groupBy": [],
    "field": "…"
  }
}

Or connect the Sentry API server directly, which lists 272 tools including this one:

Run in your terminal
claude mcp add --transport http hj-sentry-api https://mcp.hjlabs.in/mcp/sentry-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the retrieve event counts for an organization (v2) tool with organization_id_or_slug set to ….

More from Sentry API