Evaluate a programmer expression
calculate_programmerEvaluate integer expressions with C-like precedence (hex/octal/binary literals, bitwise ops, shifts) and report base conversions plus signed/unsigned interpretations.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "calculate_programmer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | No | First operand, e.g. '0xFF' or '255' | |
| b | No | Second operand (not needed for 'not') | |
| op | No | Bitwise operation (alternative to expression) | |
| bits | No | Bit width for masking and signed interpretation | 64 |
| expression | No | Integer expression, e.g. '0xFF & 0x0F | (1 << 4)' |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hex | Yes | ||
| bits | Yes | ||
| octal | Yes | ||
| binary | Yes | ||
| signed | Yes | ||
| decimal | Yes | ||
| unsigned | Yes |