Skip to main content
Glama

base64_decode

Decode base64 encoded text into readable format using this tool from Crypto_MCP, simplifying data conversion for secure handling.

Instructions

decode base64 to text

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesbase64 text to decode

Implementation Reference

  • Async handler function that executes the base64_decode tool logic: decodes the provided base64 content using Base64Util.decode and returns it as text content.
    async ({ content }) => { const result = Base64Util.decode(content); return { content: [ { type: "text", text: result, }, ], }; } );
  • Input schema definition for the base64_decode tool, specifying the 'content' parameter as a base64-encoded string using Zod.
    { content: z.string().describe("base64 text to decode"), },
  • Registration of the base64_decode tool using server.tool(), including the tool name, description, schema, and handler.
    // Base64 Decode server.tool( "base64_decode", "decode base64 to text", { content: z.string().describe("base64 text to decode"), }, async ({ content }) => { const result = Base64Util.decode(content); return { content: [ { type: "text", text: result, }, ], }; } );
  • Helper function Base64Util.decode that performs the core base64 decoding using Node.js Buffer.from(input, 'base64').toString('utf-8').
    static decode(input: string): string { return Buffer.from(input, 'base64').toString('utf-8'); }
  • src/index.ts:18-18 (registration)
    Top-level call to registerBase64Tool(server), which registers the base64_decode tool among others.
    registerBase64Tool(server);

Other Tools

Related 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/1595901624/crypto-mcp'

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