Skip to main content
Glama

Swap byte order by word

bpj_word_endian_swap
Read-onlyIdempotent

Reverse bytes within each 2-, 4- or 8-octet word of aligned input.

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": {
      "bytes": "<bytes>",
      "width": "<width>"
    },
    "name": "bpj_word_endian_swap"
  }
}

Input Schema

NameRequiredDescriptionDefault
bytesYes
widthYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnly, non-destructive, closed-world, and idempotent, so the safety profile needs no repeating. The description's only added behavioral context is 'aligned input', which hints at a length constraint, but it omits what happens on misaligned or non-hex input and whether errors are raised or the tail is left untouched. Notably, the byte-reversal semantics mean a second application restores the original, which is worth clarifying against the idempotent annotation.

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

Conciseness4/5

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

A single front-loaded sentence with no filler. It is efficient, though 'octet' plus the 2/4/8 enumeration makes it slightly denser than necessary for a two-parameter tool.

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

Completeness3/5

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

The core computation is stated precisely enough to invoke correctly, and annotations cover safety, but with no output schema and 0% schema coverage the agent still lacks the input/output representation (hex string in, hex string out?) and the behavior for lengths not divisible by width. For a small pure transform this is acceptable but visibly incomplete.

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 0% (titles only), so the description must compensate. It clarifies that 'width' means octets per word and that the intended widths are 2, 4, or 8, which is real added meaning, but the schema permits any integer 2-8 (3, 5, 6, 7), leaving a discrepancy unexplained. It also says nothing about the 'bytes' parameter being a hex-encoded string or about the output encoding.

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 and resource: 'Reverse bytes within each ... word'. The agent can tell this is a byte-order/inversion transform, which is distinct from the histogram, popcount, and encoding siblings. It stops short of naming a contrasting sibling or stating the typical use case (endianness conversion), so it is clear but not fully differentiated.

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

Usage Guidelines2/5

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

No guidance on when to choose this over the many other byte-level tools, and no statement of preconditions beyond the cryptic phrase 'aligned input'. The agent must infer that input length must be a multiple of the chosen width.

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.