csharp-sdk/tests/ModelContextProtocol.Tests/Server
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Copilot 3bff0adc2f
Add McpMetaAttribute for attaching metadata to tools, prompts, and resources (#857)
* Initial plan

* Add McpMetaAttribute and integrate with tools, prompts, and resources

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Add tests and sample usage for McpMetaAttribute

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Add Meta property to options classes and update logic to merge with attributes

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Fix missing using directives and clarify McpMetaAttribute documentation

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Make Name and Value constructor parameters in McpMetaAttribute and check AIFunction.Metadata.UnderlyingMethod

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Change Value type to object and use JsonSerializer.SerializeToNode, fix nullable warnings

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Fix UnderlyingMethod property path, use SerializerOptions, and fix JsonObject cref

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Simplify MethodInfo resolution to use function.UnderlyingMethod directly

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Fix IL2026 trimming warning by providing type info to JsonSerializer.SerializeToNode

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Fix remaining issues

* Revert to string-based JSON values for McpMetaAttribute with StringSyntax annotation

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Add StringSyntax attribute to Value property and fix sample code to use escaped quotes

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Fix tests and a bit of cleanup

* Change approach and add lots of tests

* Use JsonContext for serialization and fix floating point test comparison

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
2025-10-17 09:02:54 -04:00
..
EmptyCollectionTests.cs Fix: Synthesize handlers for empty tool/prompt/resource collections (#865) 2025-10-16 09:57:50 -04:00
McpMetaAttributeTests.cs Add McpMetaAttribute for attaching metadata to tools, prompts, and resources (#857) 2025-10-17 09:02:54 -04:00
McpServerDelegatesTests.cs Enable netfx testing. (#588) 2025-07-08 18:50:37 +03:00
McpServerExtensionsTests.cs Restructure IMcpEndpoint, IMcpClient, and IMcpServer (#723) 2025-09-16 10:22:10 -07:00
McpServerLoggingLevelTests.cs Decouple Handlers and Collections from protocol types (#765) 2025-09-24 09:42:03 -05:00
McpServerPromptTests.cs Add net10.0 assets and run some fixers (#875) 2025-10-15 15:27:43 -04:00
McpServerResourceTests.cs Add net10.0 assets and run some fixers (#875) 2025-10-15 15:27:43 -04:00
McpServerTests.cs Propagate tool call exceptions through filters (#844) 2025-10-14 19:10:55 -07:00
McpServerToolTests.cs Add net10.0 assets and run some fixers (#875) 2025-10-15 15:27:43 -04:00