Converts R objects into a human-readable string suitable for returning
to an LLM as a tool result. Data frames get a truncated print
representation; scalars are coerced directly; other objects use
capture.output(print(...)).
Converts R objects into a human-readable string suitable for returning
to an LLM as a tool result. Data frames get a truncated print
representation; scalars are coerced directly; other objects use
capture.output(print(...)).