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
| Name | Type | Description |
|---|---|---|
organization_id_or_slug required | string | The ID or slug of the organization the resource belongs to. |
groupBy required | array | can pass multiple groupBy parameters to group by multiple, e.g.… |
field required | sum(quantity) | sum(times_seen) | the sum(quantity) field is bytes for attachments, and all others the 'event'… |
statsPeriod | string | This defines the range of the time series, relative to now. The range is given… |
interval | string | This is the resolution of the time series, given in the same format as… |
start | string | This defines the start of the time series range as an explicit datetime… |
end | string | This defines the inclusive end of the time series range as an explicit… |
project | array | The ID of the projects to filter by. Use -1 to include all accessible projects. |
category | error | transaction | attachment | replay | profile | profile_duration | profile_duration_ui | profile_chunk | profile_chunk_ui | monitor | Filter by data category. Each category represents a different type of data… |
outcome | accepted | filtered | rate_limited | invalid | abuse | client_discard | cardinality_limited | See https://docs.sentry.io/product/stats/ for more information on outcome… |
reason | string | The 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:
{
"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:
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 ….