endian_swap
Swap Big-Endian to Little-Endian or reverse for hex values, numbers, or byte streams. Use when converting binary data between systems with different byte orders.
Instructions
Swaps endianness (Big-Endian <-> Little-Endian) for hex values, numbers, or byte streams. For several operations or chained steps in one call, use batch_calc.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"value": "<value>"
},
"name": "endian_swap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | Input value or hex stream (e.g. '0x12345678', 12345, or '010203040506') | |
| widthBytes | No | Target byte length (2 for 16-bit, 4 for 32-bit, 8 for 64-bit; auto if omitted) |