Skip to content

Commit 8f1a123

Browse files
authored
Merge branch 'main' into fixes/forecast-sample
2 parents fdc2383 + d47c834 commit 8f1a123

File tree

5 files changed

+23
-21
lines changed

5 files changed

+23
-21
lines changed

src/ModelContextProtocol/Configuration/McpServerOptionsSetup.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ public void Configure(McpServerOptions options)
2727
// if it otherwise lacks server information.
2828
if (options.ServerInfo is not { } serverInfo)
2929
{
30-
var assemblyName = (Assembly.GetEntryAssembly() ?? Assembly.GetCallingAssembly()).GetName();
30+
var assemblyName = Assembly.GetEntryAssembly()?.GetName();
3131
options.ServerInfo = new()
3232
{
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",
3535
};
3636
}
3737

src/ModelContextProtocol/Protocol/Types/Annotated.cs

-16
This file was deleted.

src/ModelContextProtocol/Protocol/Types/Content.cs

+6
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,10 @@ public class Content
3939
/// </summary>
4040
[JsonPropertyName("resource")]
4141
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; }
4248
}

src/ModelContextProtocol/Protocol/Types/Resource.cs

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace ModelContextProtocol.Protocol.Types;
66
/// Represents a known resource that the server is capable of reading.
77
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">See the schema for details</see>
88
/// </summary>
9-
public record Resource : Annotated
9+
public record Resource
1010
{
1111
/// <summary>
1212
/// The URI of this resource.
@@ -31,4 +31,10 @@ public record Resource : Annotated
3131
/// </summary>
3232
[JsonPropertyName("mimeType")]
3333
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; }
3440
}

src/ModelContextProtocol/Protocol/Types/ResourceTemplate.cs

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace ModelContextProtocol.Protocol.Types;
66
/// Represents a known resource template that the server is capable of reading.
77
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">See the schema for details</see>
88
/// </summary>
9-
public record ResourceTemplate : Annotated
9+
public record ResourceTemplate
1010
{
1111
/// <summary>
1212
/// The URI template (according to RFC 6570) that can be used to construct resource URIs.
@@ -31,4 +31,10 @@ public record ResourceTemplate : Annotated
3131
/// </summary>
3232
[JsonPropertyName("mimeType")]
3333
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; }
3440
}

0 commit comments

Comments
 (0)