Decode structuredContent into a typed struct T. Mirrors
ElicitResult.contentAs!T: returns T.init when structuredContent is not
an object (e.g. unset, or a content-only tool result), so callers that opted
into a typed output schema can read the result without re-deserializing by
hand. The result comes from an untrusted/possibly non-conforming server, so
— mirroring the inbound argsAs!T accessor — a deserialization failure on a
shape that does not match T is mapped to invalidParams (rather than
leaking a raw vibe exception); an McpException propagates unchanged.
Decode structuredContent into a typed struct T. Mirrors ElicitResult.contentAs!T: returns T.init when structuredContent is not an object (e.g. unset, or a content-only tool result), so callers that opted into a typed output schema can read the result without re-deserializing by hand. The result comes from an untrusted/possibly non-conforming server, so — mirroring the inbound argsAs!T accessor — a deserialization failure on a shape that does not match T is mapped to invalidParams (rather than leaking a raw vibe exception); an McpException propagates unchanged.