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
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | base64 text to decode |
Implementation Reference
- src/service/base64.ts:56-66 (handler)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, }, ], }; } - src/service/base64.ts:53-55 (schema)Input schema definition for the base64_decode tool using Zod.
{ content: z.string().describe("base64 text to decode"), }, - src/service/base64.ts:50-67 (registration)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, }, ], }; } ); - src/service/base64.ts:19-21 (helper)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);