Skip to main content
Glama
paladini

devutils-mcp-server

hex_decode

Convert hexadecimal strings to readable plain text for developers working with encoded data.

Instructions

Decode a hexadecimal string back to plain text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesThe hex string to decode

Implementation Reference

  • Implementation of the hex_decode tool, which cleans the input string and uses Buffer to convert hex back to UTF-8.
    server.tool(
      "hex_decode",
      "Decode a hexadecimal string back to plain text.",
      { input: z.string().describe("The hex string to decode") },
      async ({ input }) => {
        try {
          const cleaned = input.replace(/\s/g, "").replace(/^0x/i, "");
          const decoded = Buffer.from(cleaned, "hex").toString("utf-8");
          return { content: [{ type: "text" as const, text: decoded }] };
        } catch {
          return {
            content: [
              { type: "text" as const, text: "Error: Invalid hex input" },
            ],
            isError: true,
          };
        }
      }
    );

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/paladini/devutils-mcp-server'

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