install_batch
Install up to 20 specific skills by slug in a single call. Returns install configs for found skills and lists any invalid slugs.
Instructions
Install multiple specific skills in a single call. Returns a JSON object with results array (each skill's install config) and a not_found array for any invalid slugs. Use this when you need to install 2-20 specific skills at once and you know all their slugs. Do not use this for curated collections (use install_pack instead). Maximum 20 skills per call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slugs | Yes | Array of skill slugs in owner/repo format. Maximum 20. | |
| agent | Yes | Target agent platform |
Implementation Reference
- src/src/index.ts:961-972 (handler)The handler function that executes the install_batch tool logic. It takes an array of skill slugs and an agent name, POSTs them to /install-batch API endpoint, and returns the JSON result.
async function handleInstallBatch(args: { slugs: string[]; agent: string; }): Promise<string> { const body = { slugs: args.slugs, agent: args.agent, }; const result = await postJSON(`${API_BASE}/install-batch`, body); return JSON.stringify(result, null, 2); } - src/src/index.ts:392-413 (schema)The tool definition and input schema for install_batch. It requires 'slugs' (array of strings, max 20 skill slugs) and 'agent' (enum of target platforms).
{ name: "install_batch", description: "Install multiple skills at once. Returns install configs for all requested skills in a single call.", inputSchema: { type: "object" as const, properties: { slugs: { type: "array", items: { type: "string" }, description: "Array of skill slugs in owner/repo format. Maximum 20.", }, agent: { type: "string", enum: ["claude-code", "cursor", "codex-cli", "windsurf", "generic"], description: "Target agent platform", }, }, required: ["slugs", "agent"], }, }, - src/src/index.ts:1347-1351 (registration)The case statement in the tool dispatch switch that routes the 'install_batch' tool name to handleInstallBatch with proper type casting.
case "install_batch": resultText = await handleInstallBatch( toolArgs as { slugs: string[]; agent: string } ); break; - src/src/index.ts:79-110 (helper)The postJSON helper function used by handleInstallBatch to make the POST request to the API endpoint.
function postJSON(url: string, body: Record<string, unknown>, extraHeaders?: Record<string, string>): Promise<unknown> { return new Promise((resolve, reject) => { const payload = JSON.stringify(body); const parsed = new URL(url); const options = { hostname: parsed.hostname, port: parsed.port || 443, path: parsed.pathname + parsed.search, method: "POST", headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(payload), "User-Agent": `loaditout-mcp/${SERVER_VERSION}`, ...extraHeaders, }, }; const req = https.request(options, (res) => { let data = ""; res.on("data", (chunk: string) => (data += chunk)); res.on("end", () => { try { resolve(JSON.parse(data)); } catch { resolve({ status: res.statusCode }); } }); }); req.on("error", reject); req.write(payload); req.end();