jongalloway / jongalloway/dotnet-mcp

Review error codes (-32002 deprecation, renumbered protocol codes)

Open
#487 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: mcp-protocol errors priority: medium
Dominant language
C#
Stars
36
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Review custom error codes (-32002 deprecation, renumbered protocol codes)

Part of #481.

DotNetMcp/Errors/McpErrorCodes.cs defines custom codes, including ResourceNotFound = -32002 and CapabilityNotAvailable = -32001.

SDK 2.0 / spec changes:

  • SEP-2164: -32002 resource-not-found is deprecated in favor of -32602 InvalidParams under 2026-07-28 (SDK auto-selects by negotiated version).
  • Protocol error codes renumbered: HeaderMismatch -32001 → -32020, MissingRequiredClientCapability -32003 → -32021, UnsupportedProtocolVersion -32004 → -32022. This frees -32001, but the custom CapabilityNotAvailable = -32001 should be re-confirmed for collisions.
Tasks
  • Decide how to map ResourceNotFound: keep -32002 for legacy, prefer -32602 for 2026-07-28, or defer to the SDK's automatic selection.
  • Confirm -32001/-32002 no longer collide with renumbered protocol codes.
  • Update ErrorCodeDictionary/ErrorResultFactory and related docs as needed.
Acceptance
  • Error-code mapping reviewed and aligned with the negotiated protocol version; no collisions.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading DotNetMcp/Errors/McpErrorCodes.cs, then trace ErrorCodeDictionary and ErrorResultFactory to understand how negotiated protocol versions select error codes. Compare the existing mappings with the cited SEP-2164 and SDK 2.0 changes; done means the version-aware mapping is reviewed, documented as needed, and has no code collisions.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.