Skip to content

Fix list_projects date-time schema failures and wildcard filter crash - #2730

Merged
ejsmith merged 2 commits into
mainfrom
fix/mcp-utc-dates
Nov 16, 2026
Merged

ejsmith merged 2 commits into
mainfrom
fix/mcp-utc-dates

Conversation

@ejsmith

@ejsmith ejsmith commented Nov 16, 2026

Copy link
Copy Markdown
Member

Fixes two list_projects failures seen from Claude Code against be.exceptionless.io/mcp.

What broke

Call Result
list_projects (org with old projects) Client rejects output: createdUtc must match format "date-time"
list_projects with filter: "name:*web*" An error occurred invoking 'list_projects' (unhandled ES 400)

Causes and fixes

  • Dates without Z: older documents were stored without a time zone, read back as DateTimeKind.Unspecified, and serialized as 2016-01-11T20:05:59.7185672. RFC 3339 date-time needs a zone.
    • New McpJsonSerializerOptions.Default adds a type-info modifier that writes every DateTime/DateTime? property as UTC (Unspecified → UTC, Local → converted).
    • Wired into WithTools<ExceptionlessMcpTools>(...), the unknown-argument error result, and Exie's tool-result serializer, so it covers projects, stacks, events, counts, context, and details.projects in errors.
    • A modifier (not a converter) keeps format: date-time in the generated output schema.
  • Leading wildcards: project search skipped the leading-wildcard check stacks/events use. Now returns invalid_filter. ProjectFilterDescription documents name:web / name:web*.

Tests

  • ListProjectsAsync_DatesStoredWithoutTimeZone_SerializeAsUtc (stores an Unspecified project, checks every date has a zone)
  • Serialize_DatesWithoutTimeZone_WritesUtc, Serialize_LocalAndUtcDates_WritesSameInstantInUtc, ListProjects_OutputSchemaAdvertisesDateTimeFormat
  • ListProjectsAsync_LeadingWildcardFilter_ReturnsInvalidFilter, ListProjectsAsync_TrailingWildcardNameFilter_ReturnsMatchingProjects
  • Exceptionless.Tests.Mcp + Exceptionless.Tests.Assistant: 507 passed, 26 skipped (evals), 0 failed

Not in scope

The REST API still returns old dates without Z (the browser parses those as local time). Same modifier could go on ConfigureExceptionlessApiDefaults in a follow-up.

Older projects and stacks were stored without a time zone, so their dates
serialized without a Z and failed the output schema's date-time format,
breaking list_projects for MCP clients that validate structured output.
A type-info modifier on the MCP serializer (and Exie's) now writes every
DateTime as UTC without changing the generated output schema.

list_projects with a leading wildcard such as name:*web* threw an
unhandled Elasticsearch error; it now returns invalid_filter like
search_stacks and search_events.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T20:23:00.330590Z c568ced New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d03b87bc26

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Complexity Health
Exceptionless.AppHost 23% 22% 130 ❌
Exceptionless.Core 78% 70% 11206 ✔
Exceptionless.Insulation 51% 43% 370 ➖
Exceptionless.Web 87% 73% 10316 ✔
Summary 81% (29954 / 36860) 71% (15305 / 21578) 22022 ✔

@ejsmith
ejsmith merged commit 6bdce3b into main Nov 16, 2026
21 checks passed
@ejsmith
ejsmith deleted the fix/mcp-utc-dates branch November 16, 2026 21:51
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