pub fn enforce_request_protocol_version(
id: &Value,
metadata: &McpRequestMetadata,
) -> Result<Option<McpProtocolMode>, Value>Expand description
Validate that a request’s metadata targets a supported version.
Returns an Err(error_response) payload ready to ship back to the
client when the version is recognized but unsupported, leaving the
caller to send the response. Ok(None) means legacy; Ok(Some(meta))
means RC.