# LibTmux.Mcp.BoundedText.Fit

- **Module:** LibTmux.Mcp.BoundedText
- **Package:** LibTmux.Mcp
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux.Mcp/Results/BoundedText.cs#L36
- **Page:** https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-boundedtext-fit/

```
LibTmux.Mcp.BoundedText.Fit(lines: IReadOnlyList<string>, maxLines: int?, maxBytes: int) -> BoundedText
```

Cuts lines down to a line and byte budget, keeping the newest.

## Parameters

- `lines` (IReadOnlyList<string>): The captured text, oldest first.
- `maxLines` (int?): The most lines to keep, or null for no line limit.
- `maxBytes` (int): The most UTF-8 bytes to keep.

## Returns

The text that fits, and what it cost to make it fit.
