Skip to content

feat(tools): add search_issue_events tool with AI agent - #688

Merged
dcramer merged 5 commits into
mainfrom
search-issue-events
Dec 18, 2025
Merged

dcramer merged 5 commits into
mainfrom
search-issue-events

Conversation

@dcramer

@dcramer dcramer commented Dec 18, 2025 •

Copy link
Copy Markdown
Member

Implement new search_issue_events tool that filters events within a specific issue using natural language queries. This fills the gap between search_events (searches across all issues) and get_issue_details (returns one event).

Key features:

  • Natural language query translation via embedded agent
  • Filters by time, environment, release, user, trace ID, and custom tags
  • Automatically constrains results to specified issue
  • Support for both issueId + organizationSlug and issueUrl parameters

Additional changes:

  • Add pointer to search_issue_events in get_issue_details output
  • Remove CLAUDE.md files from all tool directories (not needed in source)

Closes #685 - filter historical events within specific issues Partially addresses #534 - better event browsing for investigation

Implement new search_issue_events tool that filters events within a specific
issue using natural language queries. This fills the gap between search_events
(searches across all issues) and get_issue_details (returns one event).

Key features:
- Natural language query translation via embedded GPT-4o agent
- Filters by time, environment, release, user, trace ID, and custom tags
- Automatically constrains results to specified issue
- Support for both issueId + organizationSlug and issueUrl parameters

Additional changes:
- Add pointer to search_issue_events in get_issue_details output
- Remove CLAUDE.md files from all tool directories (not needed in source)
- Simplified tool description from 28 to 10 lines for clarity

Closes #685 - filter historical events within specific issues
Partially addresses #534 - better event browsing for investigation

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update tool count expectations in use_sentry handler tests after adding
search_issue_events tool (20 tools exposed to agent, 21 total including use_sentry).

- Base case: 20 tools (21 total - use_sentry itself)
- With org constraint: 19 tools (20 - find_organizations)
- With both constraints: 18 tools (20 - find_organizations - find_projects)

Also updated snapshots for related tests.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Comment thread packages/mcp-core/src/tools/search-issue-events/handler.ts
The sort parameter was extracted from the agent response and validated,
but never passed to the listEventsForIssue API call. This meant events
were always returned in the API's default order regardless of the agent's
sorting decision.

Changes:
- Add sort parameter to listEventsForIssue API method signature
- Pass sort to URL params in API call
- Update handler to pass sortParam to API call

This matches the pattern used in search_events handler (line 187).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Comment thread packages/mcp-core/src/tools/search-issue-events/utils.ts Outdated
Comment thread packages/mcp-core/src/tools/search-issue-events/utils.ts
@dcramer
dcramer merged commit 7c4c675 into main Dec 18, 2025
14 checks passed
@dcramer
dcramer deleted the search-issue-events branch December 18, 2025 21:50

This branch was previously deployed

1 inactive deployment
Actions — 5fdb99ce Deployed Dec 18, 2025 by dcramer via eval #684
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Support for querying specific historical events within an issue

1 participant