Skip to content

Write null fields so tool results match their output schemas - #49

Merged
stphnwlsh merged 1 commit into
mainfrom
fix/mcp-protocol-conformance
Nov 6, 2026
Merged

stphnwlsh merged 1 commit into
mainfrom
fix/mcp-protocol-conformance

Conversation

@stphnwlsh

Copy link
Copy Markdown
Collaborator

Summary

Tool results left out null fields, but the output schemas list them as required. The last page of any search or list had no nextOffset, so strict clients such as Open WebUI's MCP client rejected the result. The serializer now writes nulls. It has to say JsonIgnoreCondition.Never outright, because the options start from the SDK's defaults, which also drop nulls.

AverageStars and the movie and author fields on ReviewResult now come through as null too.

The conformance check still reports one failure: a 2025-11-25 MCP-Protocol-Version header on a 2026-07-28 request gets HTTP 200 and -32601, not 400 and -32020. The SDK treats the older header as a legacy request before anything compares the two. 2.3.1 does the same, so that one stays open here.

Related issues

None.

Type of change

  • Bug fix
  • New feature
  • Breaking change (the generated solution or template parameters change in a way existing users will notice)
  • Refactoring or clean-up
  • Documentation
  • Build, pipeline or dependency update

Shared layers

  • This only touches the Presentation layer of this template.
  • This touches the Application or Infrastructure layers, tests, pipeline or repository setup, so it needs to be carried across all five templates.

Checklist

  • dotnet build and dotnet test pass locally with no warnings.
  • I added or updated tests, and line coverage stays at or above 95%.
  • I updated the README or docs where behaviour changed.
  • If this changes how we do something, I updated the matching skill in .agents/skills.
  • I checked the template still installs and creates a working solution (see CONTRIBUTING.md).

@stphnwlsh stphnwlsh self-assigned this Nov 6, 2026
@github-actions github-actions Bot added the bug Something isn't working label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Build Pipeline

✅ Ready to merge. Every stage passed.

Stage Result Details
Build 🟢 Passed Version 2026.11.06.187-pr-49 · Template package 230 KB
Test 🟢 Passed 243 passed · 0 failed · 0 skipped · Template installs, builds and passes its tests
Coverage 🟢 Passed 100% (797 of 797 lines) · Needs 95%
Static Analysis 🟢 Passed No open CodeQL alerts
Dependency Review 🟢 Passed 0 vulnerable packages · 0 licence problems
Container Scan 🟢 Passed Image starts and answers · No open Trivy alerts

Commit 285b3b5 · Full run

@stphnwlsh
stphnwlsh merged commit 6f1a7ad into main Nov 6, 2026
13 checks passed
@stphnwlsh
stphnwlsh deleted the fix/mcp-protocol-conformance branch November 6, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant