Skip to main content
Glama

base64_decode_text

Decode Base64 encoded strings into readable text instantly. Use this tool to convert encoded data back to its original text format on the Base64 MCP Server.

Instructions

将Base64编码解码为文本

Args: encoded: Base64编码的字符串 Returns: 解码后的文本

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
encodedYes

Implementation Reference

  • The handler function for the 'base64_decode_text' tool. It is decorated with @mcp.tool() for registration and implements Base64 text decoding with input validation and error handling.
    @mcp.tool() def base64_decode_text(encoded: str) -> str: """将Base64编码解码为文本 Args: encoded: Base64编码的字符串 Returns: 解码后的文本 """ try: # 清理输入,移除可能的前缀和空白 encoded = encoded.strip() if "Base64编码结果:" in encoded: encoded = encoded.split("Base64编码结果:")[1].strip() # 验证是否为有效的Base64字符串 if not all( c in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" for c in encoded ): return "错误: 输入包含非Base64字符" # 尝试解码 decoded = base64.b64decode(encoded).decode("utf-8") return f"Base64解码结果: {decoded}" except Exception as e: return f"解码失败: {str(e)}"

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/liuyazui/base64_server'

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