Tool.withToolAnnotations

Fluent typed setter mirroring toolAnnotations(): encodes a typed ToolAnnotations into the raw annotations Json so callers never have to hand-build the .toJson() themselves (symmetric with the typed Resource/ResourceTemplate.annotations write path). An empty ToolAnnotations clears the field (leaves it Json.undefined), so it is omitted from the serialized form. The raw-Json storage is unchanged, so unknown annotation keys set via annotations directly still round-trip.

struct Tool
ref return @safe
withToolAnnotations