pub fn parse_payload<T: DeserializeOwned>( v: Value, what: &str, ) -> Result<T, ToolError>
Accepts a payload either as a JSON object or as a YAML document in a string — agents naturally write the YAML the docs show.