Skip to main content

prepare_format_value

Function prepare_format_value 

Source
pub fn prepare_format_value(
    value: Value,
    format: OutputFormat,
    presentation: PresentationMode,
) -> Value
Expand description

Prepare a successful result for its requested format at the wire boundary.

JSON remains a JSON value in compounded response envelopes, so the MCP seam uses this helper directly instead of round-tripping through a serialized string. Keeping the policy here prevents the single-value and compounded paths from drifting.