base_convert
Convert integer strings between bases 2 and 36 exactly, preserving values beyond 2^53 where naive conversion loses precision.
Instructions
Convert an integer string between bases 2 and 36 with arbitrary precision. Uses big-integer parsing, so values beyond IEEE-754 double precision (2^53) stay exact, which is exactly where naive conversion goes wrong. A leading 0b/0x/0o prefix is ignored.
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>",
"fromBase": "<fromBase>",
"toBase": "<toBase>"
},
"name": "base_convert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | Integer as text, e.g. "ff" or "255" | |
| toBase | Yes | Target base | |
| fromBase | Yes | Source base |