Skip to main content
Glama

bitwise-operations-calculator

Read-onlyIdempotent

Run a bitwise operation (AND, OR, XOR, NOT, <<, >>, >>>) on two BigInt operands and return the result in decimal, hex, binary, octal, plus the low-32-bit binary representation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYesFirst integer as a string. Can be decimal ('255'), hex ('0xff' or 'ff'), binary ('0b1010' or '1010'), or octal ('0o17' or '17'). The `base` field tells the engine how to parse it.
bNoSecond integer as a string. Required for AND, OR, XOR, and the three shifts. Ignored for NOT (unary).
opYesOperation: and (&), or (|), xor (^), not (~), shl (<<), shr (>> arithmetic right shift), ushr (>>> logical right shift on the low 32 bits).
baseYesHow to parse a and b: dec, hex, bin, or oct.dec

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
opYesThe operation that ran, echoed for display.
binYesResult in binary, prefixed with 0b. Negative values are signed (leading minus).
decYesResult as a decimal string.
hexYesResult in hexadecimal, prefixed with 0x. Negative values are signed (leading minus).
octYesResult in octal, prefixed with 0o. Negative values are signed (leading minus).
bits32YesLow 32 bits of the result as a binary string, MSB on the left. Used for the visual grid.
exceeds32YesTrue when the result does not fit in a signed 32-bit integer.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already disclose read-only, idempotent, non-destructive behavior. The description adds meaningful context beyond that: it explains the output includes decimal, hex, binary, octal, and a low-32-bit binary representation, and that operands are BigInts. No contradictions with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, front-loaded sentence that lists operations and output formats without redundancy. Every piece of information earns its place, and the structure makes the core purpose immediately clear.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is a straightforward calculator with a moderate parameter set and an output schema. The description covers the operational scope and output formats, while the schema supplies parameter details and the annotations cover safety. No significant missing context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with each parameter well-documented (formats, required conditions, shift semantics). The description itself adds little parameter-level detail beyond restating that operands are BigInts, which is already implied by the schema. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool runs bitwise operations (AND, OR, XOR, NOT, shifts) on two BigInt operands and returns results in multiple bases plus a low-32-bit binary representation. The verb+resource are specific, and the operation list distinguishes it from other calculator tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for use: when a bitwise operation on arbitrary-precision integers is needed. It does not explicitly name alternatives or exclusions, but no sibling tool offers overlapping functionality, so the intended use is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.9/5.0
Disambiguation4/5

Most tools have distinct purposes. However, 'hex-to-rgb' is redundant with 'color-converter', which already handles hex-to-RGB conversion, causing potential confusion.

Naming Consistency4/5

Names follow a consistent lowercase-with-hyphens style, but vary in pattern (e.g., 'angle-converter', 'average-calculator', 'dedup-lines'). One tool ('internal-do-not-call') deviates from the descriptive norm.

Tool Count2/5

With 46 tools, the server is heavily populated. Many converters could be merged into a generic unit converter, and there is redundancy, making the surface unnecessarily large for a single server.

Completeness4/5

The server covers a broad range of utility domains: converters, text processing, math, cryptography, etc. Minor redundancies exist (e.g., hex-to-rgb vs color-converter), but the set is otherwise comprehensive.

Resources