File tree 5 files changed +23
-21
lines changed
5 files changed +23
-21
lines changed Original file line number Diff line number Diff line change @@ -27,11 +27,11 @@ public void Configure(McpServerOptions options)
27
27
// if it otherwise lacks server information.
28
28
if ( options . ServerInfo is not { } serverInfo )
29
29
{
30
- var assemblyName = ( Assembly . GetEntryAssembly ( ) ?? Assembly . GetCallingAssembly ( ) ) . GetName ( ) ;
30
+ var assemblyName = Assembly . GetEntryAssembly ( ) ? . GetName ( ) ;
31
31
options . ServerInfo = new ( )
32
32
{
33
- Name = assemblyName . Name ?? "McpServer" ,
34
- Version = assemblyName . Version ? . ToString ( ) ?? "1.0.0" ,
33
+ Name = assemblyName ? . Name ?? "McpServer" ,
34
+ Version = assemblyName ? . Version ? . ToString ( ) ?? "1.0.0" ,
35
35
} ;
36
36
}
37
37
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -39,4 +39,10 @@ public class Content
39
39
/// </summary>
40
40
[ JsonPropertyName ( "resource" ) ]
41
41
public ResourceContents ? Resource { get ; set ; }
42
+
43
+ /// <summary>
44
+ /// Optional annotations for the content.
45
+ /// </summary>
46
+ [ JsonPropertyName ( "annotations" ) ]
47
+ public Annotations ? Annotations { get ; init ; }
42
48
}
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ namespace ModelContextProtocol.Protocol.Types;
6
6
/// Represents a known resource that the server is capable of reading.
7
7
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">See the schema for details</see>
8
8
/// </summary>
9
- public record Resource : Annotated
9
+ public record Resource
10
10
{
11
11
/// <summary>
12
12
/// The URI of this resource.
@@ -31,4 +31,10 @@ public record Resource : Annotated
31
31
/// </summary>
32
32
[ JsonPropertyName ( "mimeType" ) ]
33
33
public string ? MimeType { get ; init ; }
34
+
35
+ /// <summary>
36
+ /// Optional annotations for the resource.
37
+ /// </summary>
38
+ [ JsonPropertyName ( "annotations" ) ]
39
+ public Annotations ? Annotations { get ; init ; }
34
40
}
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ namespace ModelContextProtocol.Protocol.Types;
6
6
/// Represents a known resource template that the server is capable of reading.
7
7
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">See the schema for details</see>
8
8
/// </summary>
9
- public record ResourceTemplate : Annotated
9
+ public record ResourceTemplate
10
10
{
11
11
/// <summary>
12
12
/// The URI template (according to RFC 6570) that can be used to construct resource URIs.
@@ -31,4 +31,10 @@ public record ResourceTemplate : Annotated
31
31
/// </summary>
32
32
[ JsonPropertyName ( "mimeType" ) ]
33
33
public string ? MimeType { get ; init ; }
34
+
35
+ /// <summary>
36
+ /// Optional annotations for the resource template.
37
+ /// </summary>
38
+ [ JsonPropertyName ( "annotations" ) ]
39
+ public Annotations ? Annotations { get ; init ; }
34
40
}
You can’t perform that action at this time.
0 commit comments