boj_cartridge_invoke
Execute commands on specific cartridges to perform operations like database management or version control through a unified server gateway.
Instructions
Invoke a BoJ cartridge operation. Send a command to a specific cartridge for execution.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Cartridge name (e.g. database-mcp, git-mcp) | |
| params | No | Parameters to pass to the cartridge invocation |
Implementation Reference
- mcp-bridge/main.js:117-131 (handler)The `invokeCartridge` function acts as the handler for the tool, making an HTTP POST request to the BoJ server to invoke the specified cartridge.
async function invokeCartridge(name, params) { if (!isValidCartridgeName(name)) { return { error: `Invalid cartridge name: ${name}` }; } try { const res = await fetch(`${BOJ_BASE}/cartridge/${encodeURIComponent(name)}/invoke`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(params || {}), }); return await res.json(); } catch { return { error: "BoJ REST API not reachable. Invocation requires a running server.", cartridge: name, hint: "Start with: systemctl --user start boj-server" }; } } - mcp-bridge/main.js:336-355 (registration)Registration of the `boj_cartridge_invoke` tool in the MCP server setup.
tools.push({ name: "boj_cartridge_invoke", description: "Invoke a BoJ cartridge operation. Send a command to a specific cartridge for execution.", inputSchema: { type: "object", properties: { name: { type: "string", description: "Cartridge name (e.g. database-mcp, git-mcp)", }, params: { type: "object", description: "Parameters to pass to the cartridge invocation", }, }, required: ["name"], }, }); - mcp-bridge/main.js:662-670 (handler)The switch case block in the request handler that routes requests for `boj_cartridge_invoke` to the `invokeCartridge` function.
case "boj_cartridge_invoke": { const result = await invokeCartridge(args.name, args.params); sendResult(id, { content: [ { type: "text", text: JSON.stringify(result, null, 2) }, ], }); break; }