Skip to main content
Glama

base64_decode

Decode base64-encoded text to its original readable format. Use this tool to convert encoded strings back to plain text for processing or analysis.

Instructions

decode base64 to text

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesbase64 text to decode

Implementation Reference

  • The handler function that executes the base64_decode tool logic by calling Base64Util.decode on the input and returning the result as text content.
    async ({ content }) => { const result = Base64Util.decode(content); return { content: [ { type: "text", text: result, }, ], }; }
  • Input schema definition for the base64_decode tool using Zod.
    { content: z.string().describe("base64 text to decode"), },
  • Registration of the base64_decode tool on the MCP server, including name, description, schema, and handler.
    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 utility function in Base64Util class that performs the core base64 decoding using Node.js Buffer.
    static decode(input: string): string { return Buffer.from(input, 'base64').toString('utf-8'); }
  • src/index.ts:18-18 (registration)
    Invocation of the registerBase64Tool function to register base64 tools, including base64_decode, on the main MCP server.
    registerBase64Tool(server);

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