Skip to main content
Glama

hash_encode

Read-only

Hash and encode text. Use when a task needs an exact SHA or MD5 digest, or text converted to or from base64, base64url, hex or URL percent-encoding, where a language model would otherwise guess the output. Cost: 1 credit per call.

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": {
      "operation": "<operation>",
      "text": "<text>"
    },
    "name": "hash_encode"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe input, up to 1 MiB.
digestNoFor hash: hex (the default), base64 or base64url.
formatNoFor encode and decode: base64, base64url, hex or url.
algorithmNoFor hash: sha256 (the default), sha384, sha512, sha1 or md5.
operationYeshash, encode or decode.
input_encodingNoFor hash: how to read text. utf8 (the default), base64 or hex.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already mark this readOnlyHint=true, so the safety profile is covered. The description adds useful behavioral context by disclosing the cost of "1 credit per call" and emphasizing exactness, but it does not cover error behavior or return details beyond what the schema implies.

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 three tight sentences: purpose first, then usage guidance, then cost. Every sentence adds value, with no redundant or filler wording.

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 deterministic hash/encoding utility with complete parameter descriptions, the definition covers purpose, when to use it, supported formats, and cost. It does not describe the output shape, but no output schema exists and the operation is straightforward enough that this is a minor gap.

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%, with operation, algorithm, format, digest, input_encoding, and text all documented in the schema. The description reinforces the supported encodings and digest use cases but adds no defaults or parameter syntax beyond what the schema already provides, so baseline 3 is appropriate.

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 clearly states a specific verb and resource: "Hash and encode text," plus the exact digest and encoding outputs it handles. It does not explicitly distinguish itself from sibling tools, so it falls short of the top score for sibling differentiation.

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?

It gives a clear when-to-use condition: tasks needing exact SHA/MD5 digests or conversions to/from base64, base64url, hex, or URL encoding where an LLM would guess. It does not provide when-not-to-use guidance or name alternatives.

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