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
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | base64 text to decode |
Implementation Reference
- src/service/base64.ts:56-67 (handler)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, }, ], }; } );
- src/service/base64.ts:53-55 (schema)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"), },
- src/service/base64.ts:49-67 (registration)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, }, ], }; } );
- src/service/base64.ts:19-21 (helper)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);