Home / Servers / Sentry API / update_organization_discover_saved_query

Edit an Organization's Discover Saved Query

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

Edit an Organization's Discover Saved Query Modify a saved query. [PUT /api/0/organizations/{organization_id_or_slug}/discover/saved/{query_id}/]

Name on the gateway: sentry_api__update_organization_discover_saved_query · may change things.

Parameters

NameTypeDescription
organization_id_or_slug requiredstringThe ID or slug of the organization the resource belongs to.
query_id requiredintegerThe ID of the Discover query you'd like to retrieve.
name requiredstringThe user-defined saved query name.
projectsarrayThe saved projects filter for this query.
queryDatasetdiscover | error-events | transaction-likeThe dataset you would like to query. Note: discover is a **deprecated** value.…
startstringThe saved start time for this saved query.
endstringThe saved end time for this saved query.
rangestringThe saved time range period for this saved query.
fieldsarrayThe fields, functions, or equations that can be requested for the query. At…
orderbystringHow to order the query results. Must be something in the field list, excluding…
rollupintegerTime-bucket granularity in seconds for the saved query.
aggregationsarrayAggregate functions to apply, each as a [function, column, alias] triple.
groupbyarrayColumns to group results by.
conditionsarrayFilter conditions, each as a [column, operator, value] triple.
limitintegerMaximum number of rows to return, from 0 to 1000.
versionintegerSaved query schema version. 1 for the legacy shape, 2 for the current one.
environmentarrayThe name of environments to filter by.
querystringFilters results by using query syntax.
widthsarrayRendered column widths, in the same order as the query's fields.
yAxisarrayAggregate functions to be plotted on the chart.
displaystringVisualization type for saved query chart. Allowed values are: - default…
topEventsintegerNumber of top events' timeseries to be visualized.
intervalstringResolution of the time series.

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__update_organization_discover_saved_query",
  "arguments": {
    "organization_id_or_slug": "…",
    "query_id": 0,
    "name": "…"
  }
}

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 edit an organization's discover saved query tool with organization_id_or_slug set to ….

More from Sentry API