Skip to main content
Glama
Jambozx

OnlineCyberTools MCP (280+ filterable tools)

webdev_data_uri_generator

Read-onlyIdempotent

Generate a data URI from text or base64 file to embed inline in HTML, CSS, or JavaScript without separate file fetches. Returns encoding variations and a recommended option.

Instructions

Data URI Generator From Text Or Base64 File. Build a data: URI from supplied content so it can be embedded inline in HTML, CSS, or JavaScript with no separate file fetch. Two modes via inputMethod: text base64- and URL-encodes a raw string (textInput) and returns both variants plus the shorter recommended one; file wraps an already-base64-encoded payload (fileData) and sniffs/optimizes its MIME type. Use this for arbitrary text, SVG markup, CSS, JS, or any MIME you name; use webdev_base64_image_encoder instead when you have a raster image and need pixel-dimension detection, or encoding_decoding_base64 for plain base64 encode/decode without the data: wrapper. Runs locally on the data you provide: read-only, non-destructive, contacts no external service, idempotent, and rate-limited (30 requests/minute for anonymous callers). Returns the data URI(s), MIME type, byte sizes, encoding variations, a recommended encoding, suitability analysis, and optional embed code examples.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputMethodNoWhich source to encode. text uses textInput; file uses fileData. Defaults to file.file
textInputNoRaw text/markup to encode (text mode). Required and non-empty when inputMethod is text; empty returns HTTP 400.
mimeTypeNoMIME type written into the text-mode data URI, e.g. text/plain, text/html, text/css, image/svg+xml. Defaults to text/plain.text/plain
encodingNoCharset label used when includeCharset is true (text mode). Defaults to utf-8.utf-8
fileDataNoFile bytes as base64 (file mode). A bare base64 payload or a full data:<mime>;base64,<...> URI is accepted; the prefix is stripped. Required and non-empty when inputMethod is file; empty or invalid base64 returns HTTP 400.
fileNameNoFile name used for extension-based MIME detection and in generated examples (file mode). Defaults to file.file
fileTypeNoProvided MIME type for the file (file mode); may be overridden by detected type. Defaults to application/octet-stream.application/octet-stream
includeCharsetNoWhen true (text mode), also emit charset-tagged base64 and URL-encoded variations. Defaults to false.
optimizeSizeNoEchoed back in options; size is always compared across variations. Defaults to false.
generateExamplesNoInclude ready-to-paste embed code examples in the response. Defaults to true.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputMethodNoEchoes which mode produced the result: text or file.
textInputNoEcho of the input string (text mode only).
mimeTypeNoMIME type used in the data URI (text mode; also nested in analysis).
encodingNoCharset label used (text mode).
textLengthNoUTF-8 byte length of the input text (text mode).
variationsNoText mode: data URIs keyed by encoding - base64, urlencoded, and (when includeCharset) base64_charset, urlencoded_charset.
recommendedNoThe shortest variation data URI (text mode).
originalFileNameNoEcho of fileName (file mode).
providedMimeTypeNoThe fileType supplied by the caller (file mode).
detectedMimeTypeNoMIME type sniffed from content/extension, or null if undetermined (file mode).
originalSizeNoDecoded payload size in bytes (file mode).
dataUriSizeNoCharacter length of the generated data URI (file mode).
sizeOverheadNoPercentage size increase of the data URI over the raw bytes (file mode).
dataUriNoThe generated base64 data URI (file mode).
optimizedDataUriNoData URI rebuilt with the detected MIME type when it differs (file mode).
isOptimizedNoTrue when optimizedDataUri differs from dataUri (file mode).
analysisNoBreakdown of the data URI: mimeType, isBase64Encoded, hasCharset, parameters, isImage, isText, suitableFor (file mode), or inputLength, variationCount, mostEfficient, savings, recommendations (text mode).
examplesNoKeyed embed snippets (HTML img, CSS background, iframe, link, script, JavaScript, JSON, download anchor) when generateExamples is true.
Behavior5/5

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

Annotations already declare readOnly, non-destructive, idempotent. Description adds that it runs locally, contacts no external service, is rate-limited (30 req/min for anonymous), and is idempotent, with no contradictions.

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-structured, front-loading purpose and modes, then usage guidelines, then behavioral notes, then return value summary. Every sentence is informative with no redundancy. Efficient use of space.

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 10 params, two modes, and an output schema, the description is thorough. It covers both text and file modes, explains all options (MIME, charset, examples), and describes return fields. No gaps.

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 3. Description adds meaning by explaining how inputMethod selects mode, which params are required in each mode, defaults, and behavior (e.g., charset inclusion, optimization, examples). This goes beyond raw schema.

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 builds data: URIs from text or base64 file content, specifying two modes and explicitly distinguishing from sibling tools (webdev_base64_image_encoder, encoding_decoding_base64) by enumerating use cases.

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

Usage Guidelines5/5

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

Provides explicit when-to-use (arbitrary text, SVG, CSS, JS, any MIME) and when-not-to-use (raster images needing pixel detection; plain base64 encode/decode), naming specific alternative tools.

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/Jambozx/onlinecybertools-mcp-server'

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