Skip to content

Commit a90b922

Browse files
authored
feat: add optional lastModified field to Annotations record with backward compatibility (#568)
Resolves #565 Signed-off-by: Christian Tzolov <[email protected]>
1 parent d327fff commit a90b922

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,13 @@ public interface Annotated {
653653
@JsonIgnoreProperties(ignoreUnknown = true)
654654
public record Annotations( // @formatter:off
655655
@JsonProperty("audience") List<Role> audience,
656-
@JsonProperty("priority") Double priority) { // @formatter:on
656+
@JsonProperty("priority") Double priority,
657+
@JsonProperty("lastModified") String lastModified
658+
) { // @formatter:on
659+
660+
public Annotations(List<Role> audience, Double priority) {
661+
this(audience, priority, null);
662+
}
657663
}
658664

659665
/**

0 commit comments

Comments
 (0)