csharp-sdk/samples
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
..
AspNetCoreMcpPerSessionTools Add net10.0 assets and run some fixers (#875) 2025-10-15 15:27:43 -04:00
AspNetCoreMcpServer Add McpMetaAttribute for attaching metadata to tools, prompts, and resources (#857) 2025-10-17 09:02:54 -04:00
ChatWithTools Decouple Handlers and Collections from protocol types (#765) 2025-09-24 09:42:03 -05:00
EverythingServer Convert EverythingServer to use Streamable HTTP (#709) 2025-10-16 14:39:42 -07:00
InMemoryTransport Decouple Handlers and Collections from protocol types (#765) 2025-09-24 09:42:03 -05:00
ProtectedMcpClient Update sample with URI validation (#824) 2025-10-03 10:00:51 -07:00
ProtectedMcpServer Prune idle sessions before starting new ones (#701) 2025-08-18 11:04:27 -07:00
QuickstartClient Restructure IMcpEndpoint, IMcpClient, and IMcpServer (#723) 2025-09-16 10:22:10 -07:00
QuickstartWeatherServer Improved samples: added weather tool in AspNetCoreSseServer and option to connect via http to AspNetCoreSseServer. (#469) 2025-08-26 19:07:41 -07:00
TestServerWithHosting Onboard repo to the .NET 10 sdk (#822) 2025-09-30 20:36:12 +03:00