Skip to main content
Glama
KonghuanSmart

calculate-mcp

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYesInput value or hex stream (e.g. '0x12345678', 12345, or '010203040506')
widthBytesNoTarget byte length (2 for 16-bit, 4 for 32-bit, 8 for 64-bit; auto if omitted)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full disclosure burden. It communicates that the tool accepts hex values, numbers, and byte streams, which is useful input-handling behavior, but says nothing about width auto-detection, error cases, or what the transformed output looks like.

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?

Two sentences, zero filler, and the core operation is front-loaded ahead of the batch_calc routing note. Nothing is wasted.

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

Completeness4/5

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

For a simple, deterministic two-parameter transform with full schema coverage, the description covers the essential purpose and one routing rule. It is nearly complete, with only the return format and width defaulting behavior left implicit.

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%, so both parameters (value, widthBytes) are fully documented in the schema. The description only loosely parallels the value parameter's accepted types and adds no syntax or format detail beyond what the schema already gives, so the baseline of 3 applies.

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

Purpose4/5

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

States a specific verb (Swaps) and resource (endianness) with the mapping (Big-Endian <-> Little-Endian) and the accepted input forms, so the operation is unambiguous. It does not, however, differentiate itself from other conversion siblings like ieee754_convert or int_convert that also transform value representations.

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?

Gives one explicit routing rule: for several operations or chained steps in a single call, use batch_calc. That is a clear condition paired with an alternative, but there is no guidance on when to prefer this over the other conversion tools, so no true exclusions are stated.

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