Skip to main content
Glama

IT Tools MCP Server

index.ts1.17 kB
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { z } from "zod"; export function registerMinifyJson(server: McpServer) { server.registerTool("minify_json", { description: "Minify JSON by removing whitespace and unnecessary characters. Example: formatted JSON → compact single-line JSON", inputSchema: { json: z.string().describe("JSON string to minify"), }, // VS Code compliance annotations annotations: { title: "Minify JSON", description: "Remove whitespace and minify JSON to compact format", readOnlyHint: false } }, async ({ json }) => { try { const parsed = JSON.parse(json); const minified = JSON.stringify(parsed); return { content: [ { type: "text", text: `Minified JSON: ${minified}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error parsing JSON: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], }; } } ); }

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