Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/specs/search-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 availability**: Seer translation runs when the organization has the required Seer features and has not hidden AI features. 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
Expand Down
22 changes: 0 additions & 22 deletions packages/mcp-core/src/tools/catalog/search-events.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3406,7 +3406,6 @@ describe("search_events", () => {
},
accessToken: "test-token",
userId: "1",
experimentalMode: true,
};
const seerQuery = {
query: "span.op:http.client",
Expand Down Expand Up @@ -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"]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down
Loading