Skip to content

fix(search): read Search MCP date filters without an offset as UTC - #9798

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/search-mcp-offsetless-dates-utc
Nov 8, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/search-mcp-offsetless-dates-utc

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Search MCP date filters (startDate, endDate, modifiedAfter, modifiedBefore) now accept an ISO datetime without a UTC offset and read it as UTC, instead of failing validation
  • When the offset was missing, the client always resent the same value with Z appended, so the result is the same and the call no longer spends a full extra round on the retry
  • tools/list is byte-identical (same format: "date-time", same descriptions, no regex), so this adds no tokens to any request
  • A date with an offset passes through unchanged; anything that isn't a datetime (e.g. a bare date) is still rejected

Type of Change

  • Bug fix

Testing

  • server.protocol.test.ts: an offset-less startDate/endDate reaches the use case as UTC, an offset value passes through, and a bare date is still rejected. Fails on staging, passes with the fix
  • lib/knowledge/mcp/ suite: 50/50 passing
  • A/B on the Search MCP benchmark (83 questions, paired against two same-commit controls): all 7 offset-less dates were accepted (controls rejected 7 of 7), correctness +1.2pp (CI −1.8 to +4.5), no case regressions, input tokens flat
  • biome on changed files; CI runs the full audits and type-check

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

A date filter sent without its UTC offset failed validation, and the client
resent the same value with Z appended, costing a full extra round. Accept the
offset-less form and read it as UTC up front. tools/list is unchanged.
@vercel

vercel Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 8, 2026 11:37am UTC

Request Review

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Search MCP date filters now treat datetimes without an offset as UTC.

  • Search MCP reads offset-less date filters as UTC.

No actionable issues found. Tests were inspected, not run.

Reviews (1) · Last reviewed commit: "fix(search): read Search MCP date filter..." · Reviewed by Greptile

@waleedlatif1
waleedlatif1 merged commit 207da65 into staging Nov 8, 2026
275 of 281 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/search-mcp-offsetless-dates-utc branch November 8, 2026 19:22

This branch was previously deployed

1 inactive deployment
Preview — 3212ecda Deployed Nov 8, 2026 by vercel[bot]
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