Skip to main content
Glama
Sentry MCP

Sentry MCP

Official
by getsentry

Search Logs

search_logs
Read-only

Search Sentry application logs at any severity, returning individual events, counts, and time trends. Use it to inspect log lines; for grouped issues, errors, or traces, use the dedicated tools.

Instructions

Search Sentry logs: application log lines at any severity, including trends over time. Returns individual events, counts, and aggregates; for grouped issue lists, use search_issues. For exceptions and crashes, use search_errors; for requests whose trace has a matching log, 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_logs"
  }
}

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 and release filters here. Regex filters are unquoted RE2: `message://timeout \d+ms//`.
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 readOnly=true, openWorld=true, destructive=false, so the safety profile is covered. The description adds real context beyond that: it discloses the shape of results ('individual events, counts, and aggregates') and the fact that aggregates/trends are in scope, which tells the agent this is not just an event lister. It stops short of anything about result caps or pagination behavior, keeping it below a 5.

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 sentences, front-loaded with purpose, then return shape, then the alternative-routing list. Every clause carries distinct information and nothing is repeated from the schema.

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?

With an output schema present and 80% parameter coverage, the description does not need to explain return values, and the sibling routing is fully handled. The only residual gap is that all 10 parameters are optional, and the description never says what happens with an empty query or what the default scope is, which an agent may need to know before calling.

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%, and the schema itself documents every non-obvious parameter including sort syntax, RE2 regex form, period pattern, and where to obtain organizationSlug/regionUrl. The description adds no parameter-level meaning beyond that, so the baseline of 3 applies.

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 logs: application log lines at any severity') and immediately scopes it with 'including trends over time'. The sentence distinguishes this tool from the three named siblings, so an agent can select it 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 three explicit routing rules with conditions: grouped issue lists → search_issues, exceptions and crashes → search_errors, requests whose trace has a matching log → search_traces. This is exactly when-to-use/when-not guidance rather than an implied preference.

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