# format_execute_result

> **Function** in `deepagents_acp`

📖 [View in docs](https://reference.langchain.com/python/deepagents-acp/utils/format_execute_result)

Format execute tool result for better display.

## Signature

```python
format_execute_result(
    command: str,
    result: str,
) -> str
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `command` | `str` | Yes | The shell command that was executed |
| `result` | `str` | Yes | The raw result string from the execute tool |

## Returns

`str`

Formatted string with command, output, and exit code

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/bb27e62ebe44dd6e8104a504b1718ce87acc7ffa/libs/acp/deepagents_acp/utils.py#L337)