Skip to main content
Glama

IA-QA — 152 QA & Dev Tools for AI Agents

format_bytes

Read-onlyIdempotent

Convert raw byte counts to human-readable sizes in SI (KB=1000) or IEC (KiB=1024) units, or parse size strings back to bytes. Covers B, KB/KiB, MB/MiB, GB/GiB, TB/TiB, PB/PiB.

Input Schema

NameRequiredDescriptionDefault
bytesNoNumber of bytes to format
standardNoOutput standard (default: both)
size_stringNoSize string to parse to bytes (e.g. "1.5 GB", "512 MiB")

Output Schema

NameRequiredDescriptionDefault
bytesNo
originalNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "bytes": 1536,
      +    "standard": "iec"
      +  }
      +]
  2. Changed1 schema field changed
    • addedOutput schema / properties
      Added value: +{
      +  "bytes": {
      +    "type": "number"
      +  },
      +  "original": {}
      +}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  4. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds the meaningful semantic distinction of SI vs IEC bases, but says nothing about precedence when both 'bytes' and 'size_string' are supplied, or about the 'both' default behavior.

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, no filler, capability and unit scope front-loaded. Every clause carries information the agent needs.

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?

An output schema exists so return values need no explanation, and all three parameters are documented. The one gap is the relationship between the 'bytes' and 'size_string' inputs, which an agent must guess.

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 the baseline is 3, but the description genuinely adds value the schema lacks: it defines what 'si' and 'iec' actually mean (KB=1000 vs KiB=1024) and enumerates the supported unit suffixes, which the enum alone does not explain.

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?

States a specific bidirectional capability: convert byte counts to human-readable sizes AND parse size strings back to bytes, naming the exact unit families covered. An agent can immediately distinguish this from siblings like number_base_convert or format_table.

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

Usage Guidelines3/5

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

The phrase 'or parse size strings back to bytes' implies the two modes (bytes input vs size_string input), but there is no explicit statement of when to use which, that the two input paths are mutually exclusive, or how this differs from related conversion tools. Usage is inferable but not guided.

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.