Skip to main content
Glama

base64hub

Base64 validate

base64_validate
Read-onlyIdempotent

Check whether a string is valid Base64 and describe it, without returning the decoded content. Uses the same lenient rules as base64_decode. Returns JSON: valid, variant (standard if + or / occurs, url if - or _ occurs, mixed if both, either if neither), padded (whether the '=' padding is complete) and bytes (decoded size); or valid: false with the error base64_decode would report, such as the offending character and its position.

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": {
      "data": "<data>"
    },
    "name": "base64_validate"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesThe string to check. A data: URI is accepted too.

Output Schema

NameRequiredDescriptionDefault
bytesNo
errorNo
validYes
paddedNo
variantNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish that this is a safe, idempotent, closed-world read. The description adds value beyond that: it discloses that decoding is never performed, that validation follows lenient decoding rules, and that failures surface the same error base64_decode would report. The variant-detection rules (standard/url/mixed/either) add real behavioral detail, though some of it overlaps the return contract that the output schema already covers.

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?

Purpose is front-loaded in the first clause, followed by the rules reference and the return contract. The return enumeration is dense but each clause carries distinct meaning; only the return-shape portion is arguably redundant against the existing output schema.

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?

For a one-parameter read-only validator this is fully specified: it covers what is checked, what is deliberately not returned, which rules apply, and what a failure looks like. With an output schema present, no further return documentation is required.

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 100% with a single required parameter, and the schema itself already explains the string and data: URI acceptance. The description adds no additional syntax, size limits, or format detail for the input, so the baseline 3 applies.

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 verb and resource ('Check whether a string is valid Base64') and immediately scopes it against the obvious sibling by saying 'without returning the decoded content'. An agent can distinguish this from base64_decode without opening either schema.

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?

The phrase 'without returning the decoded content' and the reference to 'the same lenient rules as base64_decode' give clear context for when this tool is the right pick over decoding. It stops short of an explicit either/or routing statement such as 'use base64_decode if you also need the bytes'.

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.

Resources