Skip to main content
Glama
Sentry MCP

Sentry MCP

Official
by getsentry

Search Attributes

search_attributes
Read-only

Find or list span, log, or metric attribute keys in Sentry by meaning or partial name, including types and examples, to confirm exact keys before searching traces, logs, or metrics.

Instructions

Find span, log, or metric attribute keys in Sentry by meaning or partial name, with their types, descriptions, examples, and deprecation status. Alternatively, list the spans, logs, or metric attributes available. Use it to get information about attributes or find the exact key before searching traces, logs, or metrics. For attribute values, use search_traces, search_logs, or search_metrics; for issue tag values, use get_issue_tag_values.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "dataset": "<dataset>"
    },
    "name": "search_attributes"
  }
}

Input Schema

NameRequiredDescriptionDefault
freshNoBypass cached reads.
limitNoMaximum attributes to return. Defaults to 10 with a query and 50 when listing.
queryNoWhat attribute to find, in plain English or as part of a key. Omit to list the dataset's attributes.
periodNoRelative time window, e.g. `30m`, `24h`, `7d`, `90d`.
datasetYesDataset to search: spans for requests, latency, DB, or AI calls; logs for log lines; metrics for counters, gauges, and distributions.
regionUrlNo
projectSlugNo
organizationSlugNoThe organization slug, from `find_organizations`. In `org/project` notation, the part before the slash.

Output Schema

NameRequiredDescriptionDefault
bestYesWith matches, the one key that clearly answers query, if any.
notesYes
queryYes
periodYes
datasetYes
attributesYesWith list, the attributes shown. With matches, the other candidates, most relevant first.
resultTypeYeslist: the dataset's attributes. matches: the attributes that answer query.
totalAttributesYesHow many attributes this result was picked from, before limit.
presentationHintYesHow best to present this data.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.2

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare this is a read-only, non-destructive, open-world lookup. The description adds that results carry types, descriptions, examples, and deprecation status, plus caching behavior implied by the `fresh` parameter. It does not discuss rate limits or pagination beyond mentioning a limit, so it adds useful but not rich context beyond the annotations.

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: the primary capability first, the alternate listing mode second, and routing guidance third. No filler, and the most important information (what it finds and what it returns) 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?

For an eight-parameter, read-only lookup tool with an output schema, the description covers purpose, return fields, both query and list modes, and alternatives. It does not elaborate on caching or the fresh parameter, but the output schema and annotations carry most remaining weight.

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 coverage is 75%, so the schema already documents most parameters including dataset, query, limit, period, and the organization/region fields. The description adds the meaning of the two retrieval modes (query vs. listing) but does not add syntax or format detail for individual parameters beyond what the schema provides. Baseline 3 is appropriate.

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?

The description states a specific verb and resource: find attribute keys in Sentry by meaning or partial name, returning types, descriptions, examples, and deprecation status. It also covers the alternate listing mode, and differentiates from siblings like search_traces and get_issue_tag_values.

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?

It explicitly says when to use this tool (to learn about attributes or find an exact key before searching traces/logs/metrics) and how to get attribute values instead (search_traces, search_logs, search_metrics), plus where to go for issue tag values (get_issue_tag_values). Both the positive use case and the exclusions are stated.

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