Skip to content

Fix MCP index argument validation and batch errors - #2958

Merged
Widthdom merged 4 commits into
mainfrom
fix-issue2848-2849
Jun 2, 2026
Merged

Fix MCP index argument validation and batch errors#2958
Widthdom merged 4 commits into
mainfrom
fix-issue2848-2849

Conversation

@Widthdom

@Widthdom Widthdom commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Reject unsupported MCP index arguments instead of accepting and ignoring them.
  • Sanitize batch_query slot exceptions with the same tool-error sanitizer used by standalone tools/call.
  • Preserve raw batch slot exception details in server stderr for local diagnostics.

Validation

  • dotnet build -p:UseSharedCompilation=false
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --no-build --filter "FullyQualifiedName~ToolsCall_Index_RejectsUnsupportedArguments_Issue2848|FullyQualifiedName~ToolsCall_BatchQuery_SanitizesSlotExceptionMessage_Issue2849"
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll status --check --json
  • Adversarial review: found one logging-parity issue in the sanitized batch slot path, fixed it, and found no remaining blocking/actionable issues.

Documentation / Changelog

  • changelog.d/unreleased/2848.fixed.md
  • changelog.d/unreleased/2849.security.md
  • No README/guide update was needed; the MCP schema already documented only the implemented index arguments and no public output fields changed.

Follow-up Candidates

None.

Fixes #2848
Fixes #2849

@Widthdom
Widthdom merged commit 8e867b8 into main Jun 2, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue2848-2849 branch June 2, 2026 19:13
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.

batch_query slot exceptions leak raw ex.Message MCP index accepts arguments that it ignores

1 participant