Table of Contents

Class Annotations

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Represents annotations that can be attached to content, resources, and resource templates.

public sealed class Annotations
Inheritance
Annotations
Inherited Members

Remarks

Annotations enable filtering and prioritization of content for different audiences. See the schema for details.

Properties

Audience

Gets or sets the intended audience for this content as an array of Role values.

[JsonPropertyName("audience")]
public IList<Role>? Audience { get; init; }

Property Value

IList<Role>

LastModified

Gets or sets the moment the resource was last modified.

[JsonPropertyName("lastModified")]
public DateTimeOffset? LastModified { get; set; }

Property Value

DateTimeOffset?

Remarks

The corresponding JSON should be an ISO 8601 formatted string (e.g., "2025-01-12T15:00:58Z"). Examples: last activity timestamp in an open file, timestamp when the resource was attached, etc.

Priority

Gets or sets a value indicating how important this data is for operating the server.

[JsonPropertyName("priority")]
public float? Priority { get; init; }

Property Value

float?

Remarks

The value is a floating-point number between 0 and 1, where 0 represents the lowest priority 1 represents highest priority.