Candidate on base a3f6e9e6: tasks takes filters and paging, list_tasks and get_task,
a 40000-character reply cap with compact JSON, and the built-in tools line per harness.
Gate and 34 mutants in the packet.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
17 lines
1.1 KiB
JavaScript
17 lines
1.1 KiB
JavaScript
// 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" } });
|
|
});
|