We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
TextContent
1 parent 835e8cf commit 798d5d0Copy full SHA for 798d5d0
src/ModelContextProtocol.NET.Core/Models/Protocol/Shared/Content/TextContent.cs
@@ -1,7 +1,14 @@
1
+using System.Collections;
2
+using System.Runtime.CompilerServices;
3
+
4
namespace ModelContextProtocol.NET.Core.Models.Protocol.Shared.Content;
5
6
public record TextContent : Annotated
7
{
8
public string Type => "text";
9
public required string Text { get; init; }
10
11
+ public static implicit operator Annotated[](TextContent textContent) => [textContent];
12
13
+ public static implicit operator TextContent(string text) => new TextContent { Text = text };
14
}
0 commit comments