Skip to main content
Glama
laszlopere

mcp-bytesmith

bytes_edit

Edit hex byte-buffers: pad, trim, slice, concat, size, or manage 0x prefix. Returns modified buffer and byte length.

Instructions

Edit a hex byte-buffer: pad/trim to width, slice, concat, size, or 0x-prefix.

data is hex (a leading 0x is optional). Actions:

  • pad: widen to length bytes with the fill byte on side (left=prepend, right=append); never truncates if already wider.

  • trim: strip the fill byte (default 00) from side (left=leading, right=trailing) — the inverse of pad.

  • slice: take data[start:end] (Python indexing; negatives allowed).

  • concat: append each hex buffer in parts to data.

  • size: report the byte length, buffer unchanged.

  • prefix: side=left adds a 0x prefix, side=right strips it.

Returns {action, result, size}: result is the 0x-prefixed hex buffer (bare hex when prefix-stripping), size its byte length. Example: a 20-byte address -> 32-byte log topic: bytes_edit("pad", "0x1234", length=4, side="left") -> result "0x00001234"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesEdit to apply: pad (widen to `length`), trim (strip `fill`), slice (`start`:`end`), concat (append `parts`), size (report byte length), prefix (add/strip 0x).
dataYesInput byte-buffer as hex, a leading 0x is optional.
lengthNoTarget byte width for action=pad. Default None.
startNoSlice start index (Python indexing, negatives allowed); default None means 0.
endNoSlice end index (Python indexing, negatives allowed); default None means end of buffer.
partsNoHex buffers to append for action=concat. Default None.
sideNoWhich side acts: pad prepend/append, trim leading/trailing, prefix add/strip 0x. Default 'left'.left
fillNoThe pad/trim byte as one hex byte (0x optional); default '00'.00
Behavior5/5

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

No annotations provided, so description fully covers behavior: pad never truncates, trim is inverse, slice uses Python indexing, prefix adds/strips 0x. It also describes the return format and provides an example, ensuring transparency.

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?

The description is well-organized with a clear list of actions and concise bullet points. Every sentence provides necessary information, and the example is helpful without being verbose.

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?

Given 8 parameters, no output schema, and no annotations, the description thoroughly covers all actions, parameters, and return values. The example addresses a common use case, making it complete for an editing tool.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. Description adds value by explaining action-specific parameter usage (e.g., fill defaults to '00', side defaults to 'left') and gives context for how parameters interact. The example further clarifies parameter semantics.

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 it edits a hex byte-buffer with actions like pad, trim, slice, concat, size, and prefix. It distinguishes itself from sibling tools which are for encoding, hashing, etc., by focusing on low-level hex manipulation.

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?

Each action is described with specific use cases (e.g., pad to widen, trim to strip). It does not explicitly state when not to use, but the sibling tools are very different so context makes it clear. Could be improved with a note about intended vs. unintended inputs.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/laszlopere/mcp-bytesmith'

If you have feedback or need assistance with the MCP directory API, please join our Discord server