Skip to main content
Glama

Encode text

util.encode
Read-onlyIdempotent

Encode text as base64, hex, or URL encoding for safe transport between tools. Choose the format to protect strings during data transfer.

Instructions

GET /v1/encode — encode text as base64, hex, or url-encoding. Utility for safe transport of strings between tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesText to encode. Example: 'hello world'.
formatNoEncoding format. Default base64. Example: 'base64'.base64

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.4

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is covered. The description adds the HTTP endpoint and the intended use case but does not disclose output format, return structure, or edge-case behavior. With annotations covering the safety profile, a 3 is appropriate.

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 with no redundancy. The core operation and formats are front-loaded in the first sentence, and the intended context is stated in the second. Every word earns its place.

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?

For a simple utility with two fully-schema-documented parameters and annotations covering side effects, the description is adequate. It does not specify the return value or output shape, and there is no output schema, but the tool's simplicity and known encoding formats make this a minor gap rather than a critical omission.

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 description coverage is 100%, so parameters q and format are already well-documented. The description merely restates the format options already present in the enum without adding deeper meaning such as encoding nuances or format-specific conventions. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('encode') and resource ('text'), and enumerates the three supported formats (base64, hex, url-encoding). It clearly conveys what the tool does, though it does not explicitly contrast it with sibling tools like util.hash or encode variants, so it falls short of full distinction.

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 'Utility for safe transport of strings between tools' implies a use case but does not provide explicit guidance on when to choose this tool over alternatives such as util.hash or url.normalize. No exclusions or explicit comparison with siblings are given, leaving selection partly to inference.

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