Skip to main content
Glama

Embed a local image as a data URI

abox_image_data_uri

Encode local image bytes into a .txt data URI, CSS rule, HTML tag or Markdown image, using signature-based type detection and byte-preservation checks to keep source bytes intact.

Instructions

Encode original image bytes into a new local .txt data URI, .css rule/custom property, .html image tag or .md image. Uses signature-based type detection and verifies byte preservation. Standalone UTF-8 SVG URIs can use percent encoding; SVG embedding shapes use Base64 to preserve bytes through their syntax. Keeps source metadata and SVG markup; does not verify rendering or sanitize SVG. Returns paths, sizes and metadata counts.

Input Schema

NameRequiredDescriptionDefault
shapeNouri
identifierNo
input_pathYesAbsolute local filesystem path. URLs and network shares are refused.
output_pathYesAbsolute local filesystem path. URLs and network shares are refused.
svg_encodingNoauto

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A3.9/5.0
Behavior4/5

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

Adds real context beyond the annotations: signature-based type detection, byte-preservation verification, metadata/SVG markup retention, and an explicit negative scope ('does not verify rendering or sanitize SVG'). It stops short of saying whether output_path may overwrite an existing file, which matters given readOnlyHint=false and idempotentHint=false.

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?

Four tight sentences, each carrying a distinct fact (what it makes, how encoding is chosen, what is preserved, what is not done, what is returned). No filler, though the SVG-encoding sentence is dense enough to require a second read.

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?

With no output schema, the closing 'Returns paths, sizes and metadata counts' usefully covers return values, and the non-sanitization/no-render-verification caveats close the main safety gap. Remaining gap is the undocumented `identifier` parameter, which leaves one of five inputs unexplained across both schema and description.

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 coverage is only 40%, so the description has to carry weight; it partially does by mapping output shapes onto the `shape` enum in prose and hinting at the auto/base64 svg_encoding split. The `identifier` parameter (presumably the CSS custom-property/HTML name) is never mentioned, and the shape descriptions are not tied to the literal enum values.

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 concrete verb (encode image bytes) plus the exact resource produced (a local .txt data URI, .css rule/custom property, .html tag, or .md image), enumerating all output shapes. This separates it from abox_base64 and abox_image_convert without opening any schema.

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?

Offers conditional guidance for the svg_encoding choice ('Standalone UTF-8 SVG URIs can use percent encoding; SVG embedding shapes use Base64'), which is genuinely useful. However it never states when to pick this tool over the nearby abox_base64 or abox_svg_to_image siblings, so routing remains inferential.

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