hex_encode
Convert text strings to hexadecimal format for data encoding, debugging, or network transmission using the devutils-mcp-server toolkit.
Instructions
Encode a string to its hexadecimal representation.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | The string to hex-encode |
Implementation Reference
- src/tools/encoding.ts:111-123 (handler)Registration and handler implementation for the hex_encode MCP tool.
server.tool( "hex_encode", "Encode a string to its hexadecimal representation.", { input: z.string().describe("The string to hex-encode") }, async ({ input }) => ({ content: [ { type: "text" as const, text: Buffer.from(input, "utf-8").toString("hex"), }, ], }) );