Skip to main content
Glama

IT Tools MCP Server

index.ts•963 B
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { z } from "zod"; export function registerDecodeHtml(server: McpServer) { server.registerTool("decode_html", { description: "Decode HTML entities", inputSchema: { text: z.string().describe("HTML encoded text to decode"), }, // VS Code compliance annotations annotations: { title: "Decode Html", description: "Decode HTML entities", readOnlyHint: false } }, async ({ text }) => { // Proper HTML decoding order: decode &amp; LAST to prevent double-unescaping const decoded = text .replace(/&lt;/g, '<') .replace(/&gt;/g, '>') .replace(/&quot;/g, '"') .replace(/&#39;/g, "'") .replace(/&amp;/g, '&'); // Decode ampersand LAST return { content: [ { type: "text", text: `HTML decoded: ${decoded}`, }, ], }; } ); }

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/wrenchpilot/it-tools-mcp'

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