# ToolCallBuffer

> **Class** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/_tool_stream/ToolCallBuffer)

In-progress state for a single streamed tool call.

`args` and `args_parts` are two representations of the arguments used one at
a time, depending on whether the provider delivers the value whole or in
JSON string fragments.

## Signature

```python
ToolCallBuffer(
    self,
    name: str | None = None,
    tool_id: str | None = None,
    args: ProviderToolArgs = None,
    args_parts: list[str] = list(),
    displayed: bool = False,
    warned: bool = False,
)
```

## Constructors

```python
__init__(
    self,
    name: str | None = None,
    tool_id: str | None = None,
    args: ProviderToolArgs = None,
    args_parts: list[str] = list(),
    displayed: bool = False,
    warned: bool = False,
) -> None
```

| Name | Type |
|------|------|
| `name` | `str \| None` |
| `tool_id` | `str \| None` |
| `args` | `ProviderToolArgs` |
| `args_parts` | `list[str]` |
| `displayed` | `bool` |
| `warned` | `bool` |


## Properties

- `name`
- `tool_id`
- `args`
- `args_parts`
- `displayed`
- `warned`

## Methods

- [`ingest()`](https://reference.langchain.com/python/deepagents-code/_tool_stream/ToolCallBuffer/ingest)
- [`parse_args()`](https://reference.langchain.com/python/deepagents-code/_tool_stream/ToolCallBuffer/parse_args)

---

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