modelcontextprotocol / modelcontextprotocol/csharp-sdk

Allow to specify `JsonSerializerOptions` and `AIJsonSchemaCreateOptions` when adding capabilities to MCP server

Offen
#795 1 Kommentar 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@eiriktsarpalis arbeitet bereits daran.

Seit 19.9.2025.

enhancement needs confirmation
Vorherrschende Sprache
C#
Sterne
4.5k
Forks
814
Ø Merge
9 T. 19 Std.
Gemergte PRs (30 T.)
4

Beschreibung

Is your feature request related to a problem? Please describe.
Customizing json schema generation is currently not possible via AIJsonSchemaCreateOptions when adding capabilities e.g. via IMcpServerBuilder.WithResources(), IMcpServerBuilder.WithTools() etc.
WithPrompts and WithTools methods allow to specify JsonSerializerOptions while this cannot be done for WithResources.

Describe the solution you'd like
Add optional AIJsonSchemaCreateOptions argument to WithResources, WithTools , and WithPrompts method to allow schema customization.
Add optional JsonSerializerOptions argument to each WithResources method to allow setting serializer options.

Describe alternatives you've considered
none

Additional context
n/a

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.