Helper module used to build Annotations structure.
(MCP protocol: 2025-11-25)
Short example:
%Annotations{}
|> Annotations.audience(["user", "assistant"])
|> Annotations.priority(0.8)
|> Annotations.last_modified("2025-01-12T15:00:58Z")
|> Annotations.build()Result:
%{
priority: 0.8,
audience: ["user", "assistant"],
lastModified: "2025-01-12T15:00:58Z"
}Specification: Annotations
Fields
| Field | Setter | Type | Required |
|---|---|---|---|
audience | audience/2 | [String.t()] | nil | no |
priority | priority/2 | number() | nil | no |
lastModified | last_modified/2 | string | no |
Summary
Functions
Checks a priority value. nil (not set) and each number from 0 to 1 are
valid: 1 means most important, 0 means least important.
Types
Functions
@spec validate_priority(term()) :: :ok
Checks a priority value. nil (not set) and each number from 0 to 1 are
valid: 1 means most important, 0 means least important.
Spec: priority?: number.