// Scratch MCP server for row 89: tool `big` returns a text block of exactly n characters. import { createInterface } from "node:readline"; const send = (m) => process.stdout.write(JSON.stringify({ jsonrpc: "2.0", ...m }) + "\n"); createInterface({ input: process.stdin }).on("line", (line) => { if (!line.trim()) return; const m = JSON.parse(line); if (m.method === "initialize") return send({ id: m.id, result: { protocolVersion: m.params?.protocolVersion ?? "2025-06-18", capabilities: { tools: {} }, serverInfo: { name: "probe", version: "1" } } }); if (m.method === "ping") return send({ id: m.id, result: {} }); if (m.method === "tools/list") return send({ id: m.id, result: { tools: [{ name: "big", description: "Return n characters", inputSchema: { type: "object", properties: { n: { type: "integer" } }, required: ["n"] } }] } }); if (m.method === "tools/call") { const n = m.params.arguments.n; const unit = "abcdefghij"; return send({ id: m.id, result: { content: [{ type: "text", text: unit.repeat(Math.ceil(n / 10)).slice(0, n) }] } }); } if (m.id !== undefined) send({ id: m.id, error: { code: -32601, message: "nf" } }); });