modelcontextprotocol / modelcontextprotocol/csharp-sdk

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

Abierto
#795 1 comentario 0 reacciones 1 asignado Ver en GitHub

@eiriktsarpalis ya está trabajando en esto.

Desde el 19/9/2025.

enhancement needs confirmation
Lenguaje dominante
C#
Estrellas
4.5k
Forks
814
Merge medio
9 d 19 h
PR fusionados (30 d)
4

Descripción

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

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.