Skip to main content
Glama

encodeBase64

Convert text or data into Base64 format using this tool in the mcp-helper-tools server. Ideal for encoding inputs securely and efficiently.

Instructions

Encode input data to Base64

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesData to encode

Implementation Reference

  • The asynchronous handler function that encodes the input string to Base64 using Node.js Buffer API and returns the result in the standard MCP tool response format.
    handler: async ({ input }: { input: string }) => { const encoded = Buffer.from(input).toString('base64'); return { content: [ { type: 'text', text: encoded } ] }; }
  • Defines the input schema for the encodeBase64 tool, requiring an object with a single 'input' property of type string.
    inputSchema: { type: 'object', properties: { input: { type: 'string', description: 'Data to encode' } }, required: ['input'] },
  • src/index.ts:27-33 (registration)
    Registers encodeBase64 (via encodingTools) into the allTools collection, which is used by the MCP server's ListTools and CallTool request handlers to expose and execute the tool.
    const allTools: ToolKit = { ...encodingTools, ...geoTools, ...generatorTools, ...dateTimeTools, ...securityTools };

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/MissionSquad/mcp-helper-tools'

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