# summarize_tool_group

> **Function** in `deepagents_code`

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

Build a one-line summary of a run of tool calls.

Aggregates by category in first-appearance order and lowercases the lead
word of every segment after the first, e.g.
`["read_file", "read_file", "execute"]` -> "Read 2 files, ran 1 shell command".

## Signature

```python
summarize_tool_group(
    tool_names: list[str],
    *,
    tense: _Tense = 'past',
) -> str
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `tool_names` | `list[str]` | Yes | Raw tool names for the run, in call order. |
| `tense` | `_Tense` | No | Whether to phrase the summary in the present or past tense. (default: `'past'`) |

## Returns

`str`

The aggregated one-line summary string in the requested tense.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/e14e0adcbe78565ed3650e7f24b2a775d5437d25/libs/code/deepagents_code/tui/widgets/messages.py#L3090)