base_convert
Convert integer strings between binary, octal, decimal, and hexadecimal bases, with support for negative values via 32-bit two's complement.
Instructions
When: convert an integer string between bases 2/8/10/16 (32-bit two's complement fixed). Params: value (digit string, no leading '-'; use FFFFFFFF-style for negatives); from_base, to_base in {2,8,10,16}. Example: value="FF", from_base=16, to_base=10.
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>",
"from_base": "<from_base>",
"to_base": "<to_base>"
},
"name": "base_convert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | ||
| to_base | Yes | ||
| from_base | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |