# format_display_content

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/tui/widgets/tool_widgets/format_display_content)

Coerce arbitrary tool-arg content into a displayable string.

Strings pass through unchanged; other values are JSON-formatted for
readability, falling back to `str()` when serialization fails.

## Signature

```python
format_display_content(
    content: object,
) -> str
```

## Returns

`str`

A string safe to render in an approval widget.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/2069079e09546060f5b52b2cd4f0e3c813e820f3/libs/code/deepagents_code/tui/widgets/tool_widgets.py#L32)