Skip to main content
Glama

Import Sentry issues

import_sentry_issues
Idempotent

Import existing Sentry issues into Mushi's report queue by ID or search query, enabling triage of bugs that predate webhook setup.

Instructions

Pull existing Sentry issues into Mushi's report queue: by issueIds (numeric ids or short ids like WEB-12, at most 10) or by a Sentry search query (default is:unresolved) within the project's configured Sentry project, limit 1-10. For a backlog, add sinceDays (1-90) and call again with cursor set to the returned nextCursor until it is null; sentryProject picks another of the project's Sentry projects. Each issue goes through the same path as a Sentry webhook delivery: deduped per issue, linked, classified. An issue already linked to a report answers linked and is never reopened. Returns { items: [{ input, issueId, shortId, outcome, reportId, error? }], created, linked, failed, indexing, sentryProject, sentryProjects, nextCursor }. Write; idempotent; spends classification budget per new report. Needs the Sentry org slug, project slug and an auth token (event:read, project:read) in Integrations → Sentry. Use for issues that existed before the webhook was wired; then call triage_issue on a created report.

Input Schema

NameRequiredDescriptionDefault
limitNoHow many issues a query imports (1-10, default 5)
queryNoSentry search query within the configured Sentry project (default is:unresolved). Not with issueIds.
cursorNonextCursor from the previous import, to fetch the next page of a backlog. Search mode only.
issueIdsNoSentry issue ids or short ids (e.g. "4501", "WEB-12"), at most 10
projectIdNoProject UUID. Defaults to configured project. (`project_id` is accepted too.)
sinceDaysNoOnly issues seen in the last N days (1-90). Search mode only.
sentryProjectNoWhich of the project's Sentry projects to search (default: the primary one). Search mode only.

Output Schema

NameRequiredDescriptionDefault
itemsYesOne entry per requested or matched issue
failedYesIssues that could not be imported
linkedYesReport ids that already existed for these issues
createdYesReport ids created by this import
indexingYesWhether stack-frame files were queued for codebase indexing
nextCursorNoPass back as cursor to import the next page; null when the backlog is done
sentryProjectNoThe Sentry project a search ran in (null for issueIds)
sentryProjectsNoThis project's Sentry projects, primary first

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.1.14
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "nextCursor from the previous import, to fetch the next page of a backlog. Search mode only.",
      +  "pattern": "^[0-9][0-9.:-]{0,63}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / sentryProject
      Added value: +{
      +  "description": "Which of the project's Sentry projects to search (default: the primary one). Search mode only.",
      +  "pattern": "^[a-z0-9][a-z0-9_-]{0,49}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / sinceDays
      Added value: +{
      +  "description": "Only issues seen in the last N days (1-90). Search mode only.",
      +  "maximum": 90,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / nextCursor
      Added value: +{
      +  "description": "Pass back as cursor to import the next page; null when the backlog is done",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / sentryProject
      Added value: +{
      +  "description": "The Sentry project a search ran in (null for issueIds)",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / sentryProjects
      Added value: +{
      +  "description": "This project's Sentry projects, primary first",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Addedv0.1.13

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations (which only say write, idempotent, non-destructive, open-world): it discloses dedup-per-issue semantics, that already-linked issues return 'linked' and are never reopened, that each new report spends classification budget, and the exact auth prerequisites (org slug, project slug, token with event:read/project:read in Integrations → Sentry). That is the kind of operational detail an agent needs before invoking.

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

Conciseness4/5

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

Front-loaded with the core action and mode choice, then pagination, then side effects and auth. Dense and information-rich, but it is one long undivided block with some run-on sentences, so the cursor/sinceDays/cursor-loop and the auth requirement are harder to scan than they should be.

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

Completeness5/5

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

For a 7-parameter, zero-required, open-world write tool this covers everything: both input modes, pagination, per-item outcomes, auth and scope requirements, budget cost, and idempotency. An output schema exists, yet the description still names the return envelope and nextCursor, which is helpful rather than redundant.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description synthesizes cross-parameter workflow meaning the schema cannot: mutually exclusive issueIds vs. query modes, the sinceDays/cursor pagination loop, and sentryProject selecting another of the project's Sentry projects. It adds real relational context, though several per-parameter facts (limits, 'search mode only') are duplicated from the schema.

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 ('Pull existing Sentry issues into Mushi's report queue') and immediately distinguishes the two input modes (issueIds vs. a Sentry search query) that no sibling tool offers. An agent can tell this apart from triage_issue, search_reports, or the webhook path without opening the schema.

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

Usage Guidelines4/5

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

Gives clear situational context ('Use for issues that existed before the webhook was wired'), explains how to work a backlog (sinceDays + cursor loop until nextCursor is null), and routes to the follow-up tool (triage_issue on a created report). It does not state an explicit when-not or name a sibling that does the same job instead, so it stops short of a 5.

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