# to_wire_tool_input

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/hooks/tools/to_wire_tool_input)

Map native tool arguments to the compatible wire input object.

## Signature

```python
to_wire_tool_input(
    name: str,
    args: JsonObject,
) -> JsonObject
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `name` | `str` | Yes | Native dcode tool name (before wire renaming). |
| `args` | `JsonObject` | Yes | Native tool-call arguments. |

## Returns

`JsonObject`

JSON object suitable for `tool_input` on the wire.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/2069079e09546060f5b52b2cd4f0e3c813e820f3/libs/code/deepagents_code/hooks/tools.py#L119)