mold_setConfig
Configure API endpoint, authentication keys, and signing algorithm for ABLESTACK MOLD MCP Server to enable CloudStack API calls and infrastructure management.
Instructions
endpoint, apiKey, secret 및 서명 알고리즘(sha1|sha256)을 설정합니다. 기본은 sha256. persist=true면 디스크에 저장.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endpoint | No | ||
| apiKey | No | ||
| secret | No | ||
| algo | No | ||
| persist | No |
Implementation Reference
- src/app/tools.js:199-202 (handler)Handler function for mold_setConfig tool: extracts parameters, calls setConfig helper, returns redacted config as JSON text.async ({ endpoint, apiKey, secret, algo, persist = true }) => { const info = setConfig({ endpoint, apiKey, secret, algo }, { persist }); return { content: [{ type: "text", text: JSON.stringify(info, null, 2) }] }; }
- src/app/tools.js:191-197 (schema)Input schema using Zod for validating tool parameters: endpoint, apiKey, secret, algo (sha1/sha256), persist.inputSchema: { endpoint: z.string().optional(), apiKey: z.string().optional(), secret: z.string().optional(), algo: z.enum(["sha1", "sha256"]).optional(), persist: z.boolean().optional(), },
- src/app/tools.js:185-203 (registration)Registration of the mold_setConfig tool using server.registerTool, including title, description, schema, and handler.server.registerTool( "mold_setConfig", { title: "MOLD 연결정보 설정", description: "endpoint, apiKey, secret 및 서명 알고리즘(sha1|sha256)을 설정합니다. 기본은 sha256. persist=true면 디스크에 저장.", inputSchema: { endpoint: z.string().optional(), apiKey: z.string().optional(), secret: z.string().optional(), algo: z.enum(["sha1", "sha256"]).optional(), persist: z.boolean().optional(), }, }, async ({ endpoint, apiKey, secret, algo, persist = true }) => { const info = setConfig({ endpoint, apiKey, secret, algo }, { persist }); return { content: [{ type: "text", text: JSON.stringify(info, null, 2) }] }; } );
- src/util/config.js:53-58 (helper)Core setConfig helper: sanitizes inputs, updates global CONFIG state, persists to disk if requested, returns redacted config.export function setConfig({ endpoint, apiKey, secret, algo } = {}, { persist = true } = {}) { const next = sanitizeConfig({ endpoint, apiKey, secret, algo }); CONFIG = { ...CONFIG, ...next }; if (persist) saveConfigToDisk(); return getConfigRedacted(); }