# 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/47f357b27ebecf2ee9e14fbfd6ce295ec8e75788/libs/acp/deepagents_acp/utils.py#L336)