Skip to content

ref(search): Merge list tools into search tools - #877

Merged
dcramer merged 7 commits into
mainfrom
dcramer/ref/merge-search-list-tools
Apr 28, 2026
Merged

dcramer merged 7 commits into
mainfrom
dcramer/ref/merge-search-list-tools

Conversation

@dcramer

@dcramer dcramer commented Apr 3, 2026 •

Copy link
Copy Markdown
Member

Consolidates the old list/search split into three unified search tools: search_issues, search_events, and search_issue_events. The removed list_issues, list_events, and list_issue_events behavior is now available through direct query and filter parameters on those search tools, reducing the default tool surface by three tools.

Search agent usage is now framed as structured parameter repair rather than only query translation. Without an embedded agent provider, the tools execute direct Sentry query syntax and explicit parameters as-is. With a provider configured, the same request can include natural language or Sentry syntax, and the repair pass can correct the query plus related parameters such as dataset, fields, sort, and time range while preserving valid explicit inputs.

The search schemas now use query instead of naturalLanguageQuery, keep direct parameters optional where listing recent results makes sense, and improve search_events dataset guidance. In particular, log-related requests route to the logs dataset even when severity is error or warning, while exception/crash issue data stays under errors.

Generated tool/skill definitions, evals, docs, plugin agent prompts, and trace/profile follow-up guidance have been updated to point at the unified search tools. docs/adding-tools.md now documents the agent-in-tool pattern as parameter repair, including the no-provider fallback and user-facing provider error behavior.

cursor[bot]

This comment was marked as resolved.

dcramer and others added 4 commits April 28, 2026 09:05
Combine search_issues+list_issues, search_events+list_events, and
search_issue_events+list_issue_events into single tools. Each tool now
accepts both direct Sentry query syntax (via query/sort params) and
optional natural language search (via naturalLanguageQuery param).

When naturalLanguageQuery is provided and an embedded agent provider is
configured, the agent refines the intent into correct Sentry params.
When omitted, the direct params are used as-is with no agent overhead.
This eliminates the mandatory agent round-trip for simple queries like
iterating through N issues.

Removes the AGENT_DEPENDENT_TOOLS/SIMPLE_REPLACEMENT_TOOLS mutual
exclusivity system from server.ts. The 3 list_* tools and their
directories are deleted. Tool count drops by 3.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Save and restore both OPENAI_API_KEY and ANTHROPIC_API_KEY in the
ConfigurationError test teardown to prevent env var pollution across
test runs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Clarify when search_events should choose errors, logs, or spans so the embedded agent treats error-severity logs as logs instead of exception events.

Regenerate tool and skill definitions from the updated description.

Co-Authored-By: Codex GPT-5 <codex@openai.com>
Keep direct-mode search parameters optional at TypeScript call sites and apply defaults inside the unified handlers.

This preserves compatibility with natural language search calls after rebasing the merged search/list tools onto current main.

Co-Authored-By: Codex GPT-5 <codex@openai.com>
@dcramer
dcramer force-pushed the dcramer/ref/merge-search-list-tools branch from f226f6a to 5c8fa84 Compare April 28, 2026 18:22
cursor[bot]

This comment was marked as resolved.

sentry-warden[bot]

This comment was marked as resolved.

sentry-warden[bot]

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

@dcramer
dcramer force-pushed the dcramer/ref/merge-search-list-tools branch from 05559a9 to 9962824 Compare April 28, 2026 21:05
@dcramer
dcramer force-pushed the dcramer/ref/merge-search-list-tools branch from 9962824 to c21f8d6 Compare April 28, 2026 21:21
@dcramer
dcramer marked this pull request as ready for review April 28, 2026 21:36
sentry[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 6 additional findings.

Open in Devin Review

Collapse natural language search input into the existing query parameter and run configured agent providers as a repair pass over query, dataset, fields, sort, and time hints.

Update generated definitions, docs, evals, and tests so search tools expose query as the single input for both natural language and direct Sentry syntax.

Co-Authored-By: Codex GPT-5 <codex@openai.com>
@dcramer
dcramer force-pushed the dcramer/ref/merge-search-list-tools branch from c21f8d6 to 6181581 Compare April 28, 2026 21:53
@dcramer dcramer changed the title ref(tools): Merge search/list tool pairs into unified tools ref(search): Merge list tools into search tools Apr 28, 2026
Document embedded search agents as a structured parameter repair step instead of only natural-language query translation.

Clarify that direct-capable tools should skip the repair step when no usable provider is available, while selected provider API failures should surface as user-facing LLM provider errors.

Co-Authored-By: GPT-5 Codex <codex@openai.com>
devin-ai-integration[bot]

This comment was marked as resolved.

Avoid adding the default replay statsPeriod when the search repair agent returns an absolute start/end time range. Sending both relative and absolute time filters can cause replay searches to ignore the requested absolute window.

Add regression coverage for replay searches to assert start/end are sent without statsPeriod.

Co-Authored-By: GPT-5 Codex <codex@openai.com>
@dcramer
dcramer merged commit 8174594 into main Apr 28, 2026
19 checks passed
@dcramer
dcramer deleted the dcramer/ref/merge-search-list-tools branch April 28, 2026 23:27

This branch was previously deployed

1 inactive deployment
Actions — 1559306b Deployed Apr 28, 2026 by dcramer via eval #833
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.

1 participant