Skip to main content
Glama
Sentry MCP

Sentry MCP

Official
by getsentry

Search Metrics

search_metrics
Read-only

Search Sentry metrics such as counters, gauges, and distributions to retrieve values, percentiles, totals, counts, and trends over time for investigating performance and usage patterns.

Instructions

Search Sentry metrics: counters, gauges, and distributions, for values, percentiles, totals, and trends over time. Returns individual events, counts, and aggregates; for grouped issue lists, use search_issues. For latency recorded on spans, use search_traces.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
sortNoSort field, - prefix for descending, such as -count() for aggregates. Omit unless you need a specific order.
freshNoBypass cached reads.
limitNoMaximum number of results to return.
queryNoWhat to find, in natural language or Sentry search syntax. Put environment, release, and other filters here.
fieldsNoColumns to return; omit unless you need exact columns. Include aggregates such as count() or avg() for statistics.
periodNoRelative time window, e.g. `30m`, `24h`, `7d`, `90d`.
regionUrlNo
projectSlugNo
organizationSlugNoThe organization slug, from `find_organizations`. In `org/project` notation, the part before the slash.
includeExplanationNoExplain how the query was translated or repaired.

Output Schema

NameRequiredDescriptionDefault
urlYesOpens these results in Sentry.
notesYes
queryYes
resultsYes
resultTypeYes
timeSeriesYes
explanationYes
executedSearchYes
presentationHintYes
suggestedActionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.1

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the safety profile carries itself. The description adds beyond that by describing the shape of what comes back (individual events, counts, aggregates), which helps set expectations. It stops short of disclosing caching behavior (though the schema's 'fresh' param hints at it) or result limits, so it is not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences with zero padding: capability first, return shape second, sibling routing last. Every clause earns its place and the most important information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and ten parameters at 80% coverage are largely self-documenting. What is missing is guidance on the two most consequential inputs — query syntax and the period window — which leaves a small but real gap for a broad search tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 80%, so the properties largely document themselves, establishing a baseline of 3. The description adds nothing about the key query, period, fields, or sort parameters — no mention of the natural-language vs Sentry search syntax tradeoff, which is the main usage risk for this tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Search Sentry metrics') and immediately enumerates the metric types covered (counters, gauges, distributions) plus the question types it answers (values, percentiles, totals, trends). It also explicitly distinguishes itself from two siblings, so an agent can route without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit alternative routing: grouped issue lists go to search_issues, span-recorded latency goes to search_traces. Both the when-to-use and the when-NOT-to-use conditions are stated rather than implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.