diff --git a/docs/specs/search-events.md b/docs/specs/search-events.md index 8f9e283ac..2020b3049 100644 --- a/docs/specs/search-events.md +++ b/docs/specs/search-events.md @@ -143,7 +143,7 @@ Requests for a metric over time ("per hour", "per day", "trend", "over time") re - **Logs timestamp handling**: Logs don't support query-based timestamp filters like `timestamp:-1h`. Instead, use `statsPeriod=24h` parameter - **Project ID mapping**: API requires numeric project IDs, not slugs. Tool automatically converts project slugs to IDs -- **Seer opt-in**: Seer translation runs only in experimental sessions (`--experimental` for stdio or `/mcp?experimental=1` for HTTP), when the organization has the required Seer features. Default sessions use the configured embedded agent for natural-language translation; if Seer is unavailable in an experimental session, the tool falls back to that agent. +- **Seer translation**: Seer translates natural-language queries when the organization has the required Seer features and AI features are enabled. If Seer is unavailable or cannot translate the query, the tool falls back to the configured embedded agent. - **Seer cross-event filters**: Time series results do not apply cross-event filters. When Seer returns those filters for a time series, the response always begins with a warning identifying the omitted filters and the broader results, even when `includeExplanation` is false. - **Seer project scope**: For a successful Seer translation without `projectSlug`, search and Explorer links use `project=-1` to match the all-accessible-project scope sent to Seer. Other unscoped searches retain their existing default scope. - **Parallel attribute fetching**: For spans/logs/metrics, fetches both string and number attribute types in parallel for better performance diff --git a/packages/mcp-core/src/tools/catalog/search-events.test.ts b/packages/mcp-core/src/tools/catalog/search-events.test.ts index 7de937048..683ba068b 100644 --- a/packages/mcp-core/src/tools/catalog/search-events.test.ts +++ b/packages/mcp-core/src/tools/catalog/search-events.test.ts @@ -3406,7 +3406,6 @@ describe("search_events", () => { }, accessToken: "test-token", userId: "1", - experimentalMode: true, }; const seerQuery = { query: "span.op:http.client", @@ -3471,27 +3470,6 @@ describe("search_events", () => { ); }); - it("uses the embedded agent without experimental opt-in", async () => { - mockGenerateText.mockResolvedValueOnce( - mockAIResponse("spans", "span.op:http.client"), - ); - mswServer.use( - mockOrganization(["gen-ai-search-agent-translate"]), - http.get("https://sentry.io/api/0/organizations/test-org/events/", () => - HttpResponse.json({ data: [] }), - ), - ); - - const result = await searchEvents.handler(seerParams, { - ...context, - experimentalMode: undefined, - }); - - expect(mockSeerStart).not.toHaveBeenCalled(); - expect(mockGenerateText).toHaveBeenCalled(); - expect(result).not.toContain("Translated by Seer's search agent."); - }); - it("should translate natural language queries with Seer", async () => { mswServer.use( mockOrganization(["gen-ai-search-agent-translate"]), diff --git a/packages/mcp-core/src/tools/support/search-events/search.ts b/packages/mcp-core/src/tools/support/search-events/search.ts index 3879ccf45..9925d3cf9 100644 --- a/packages/mcp-core/src/tools/support/search-events/search.ts +++ b/packages/mcp-core/src/tools/support/search-events/search.ts @@ -661,7 +661,6 @@ export async function runSearchEvents( // preserves. Like the UI, an explicit environment is added to Seer's query // afterwards. const seerTranslation = - context.experimentalMode && params.query && isSeerSearchDataset(params.dataset) && !hasStructuredQuery &&