Skip to main content
Glama
ycyun

ABLESTACK MOLD MCP Server

by ycyun

MOLD API 호출(범용)

mold_call

Execute MOLD API commands with specified parameters to manage cloud infrastructure through the ABLESTACK MCP Server.

Instructions

임의의 MOLD API 명령을 호출합니다. (command + params)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes
paramsNo

Implementation Reference

  • The handler function for the 'mold_call' tool. It flattens the input parameters and calls the generic callApi function to execute the MOLD API request, returning the JSON response as text.
    async ({ command, params }) => {
      const flat = flattenParamsForMold(params ?? {});
      const data = await callApi(command, flat);
      return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
    }
  • Zod input schema for the 'mold_call' tool, defining 'command' as string and optional 'params' as record of string keys to union of primitives or nested records.
    inputSchema: {
      command: z.string(),
      params: z
        .record(
          z.string(),
          z.union([
            z.string(),
            z.number(),
            z.boolean(),
            z.record(
              z.string(),
              z.union([
                z.string(),
                z.number(),
                z.boolean(),
                z.record(z.string(), z.union([z.string(), z.number(), z.boolean()])),
              ])
            ),
          ])
        )
        .optional(),
    },
  • src/app/tools.js:45-78 (registration)
    Full registration of the 'mold_call' tool in registerCoreTools, specifying name, metadata, input schema, and handler function.
    server.registerTool(
      "mold_call",
      {
        title: "MOLD API 호출(범용)",
        description: "임의의 MOLD API 명령을 호출합니다. (command + params)",
        inputSchema: {
          command: z.string(),
          params: z
            .record(
              z.string(),
              z.union([
                z.string(),
                z.number(),
                z.boolean(),
                z.record(
                  z.string(),
                  z.union([
                    z.string(),
                    z.number(),
                    z.boolean(),
                    z.record(z.string(), z.union([z.string(), z.number(), z.boolean()])),
                  ])
                ),
              ])
            )
            .optional(),
        },
      },
      async ({ command, params }) => {
        const flat = flattenParamsForMold(params ?? {});
        const data = await callApi(command, flat);
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
      }
    );
  • Core helper function called by the handler to perform the actual signed API request to MOLD using fetch.
    export async function callApi(command, params = {}) {
      const url = buildSignedUrl({ command, ...params });
      const res = await fetch(url);
      if (!res.ok) {
        const text = await res.text();
        throw new Error(`HTTP ${res.status}: ${text} from: ${url} and params: ${JSON.stringify(params, null, 2)}`);
      }
      return res.json();
    }
  • Helper function to flatten nested parameters into flat object with bracket and dot notation suitable for MOLD API.
    export function flattenParamsForMold(params = {}) {
      const out = {};
    
      const put = (k, v) => {
        if (v === undefined || v === null) return;
        out[k] = String(v);
      };
    
      const walkNested = (val, base) => {
        if (val === undefined || val === null) return;
        if (Array.isArray(val)) {
          if (val.length && typeof val[0] === "object") {
            val.forEach((item, i) => walkNested(item, `${base}[${i}]`));
          } else {
            put(base, val.map((x) => String(x)).join(","));
          }
          return;
        }
        if (typeof val === "object") {
          for (const [sk, sv] of Object.entries(val)) {
            if (sv === undefined || sv === null) continue;
            if (typeof sv === "object" && !Array.isArray(sv)) {
              walkNested(sv, `${base}.${sk}`);
            } else {
              put(`${base}.${sk}`, sv);
            }
          }
          return;
        }
        put(base, val);
      };
    
      for (const [key, val] of Object.entries(params)) {
        if (val === undefined || val === null) continue;
        if (/[.\[]/.test(key)) {
          put(key, val);
          continue;
        }
        if (Array.isArray(val)) {
          if (val.length && typeof val[0] === "object") {
            val.forEach((item, i) => {
              for (const [sk, sv] of Object.entries(item || {})) {
                if (sv === undefined || sv === null) continue;
                if (typeof sv === "object" && !Array.isArray(sv)) {
                  walkNested(sv, `${key}[${i}].${sk}`);
                } else {
                  put(`${key}[${i}].${sk}`, sv);
                }
              }
            });
          } else {
            put(key, val.map((x) => String(x)).join(","));
          }
          continue;
        }
        if (typeof val === "object") {
          for (const [sk, sv] of Object.entries(val)) {
            if (sv === undefined || sv === null) continue;
            if (typeof sv === "object" && !Array.isArray(sv)) {
              walkNested(sv, `${key}[0].${sk}`);
            } else {
              put(`${key}[0].${sk}`, sv);
            }
          }
          continue;
        }
        put(key, val);
      }
      return out;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions calling API commands but fails to disclose critical behavioral traits like authentication requirements, rate limits, error handling, or whether it's read-only or destructive. This leaves significant gaps for an agent to understand how to use it safely and effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise with just one sentence, which is appropriately sized for a generic tool. However, it's under-specified rather than efficiently informative—the brevity comes at the cost of clarity, though it's not unnecessarily verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (2 parameters with nested objects, 0% schema coverage, no annotations, no output schema), the description is highly incomplete. It doesn't explain return values, error conditions, or provide examples, making it inadequate for an agent to use this tool effectively in the broader context of the MOLD API ecosystem.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions 'command + params' but provides no details on what commands are available, their formats, or what params might be required. With 2 parameters (one required) and complex nested structures, this minimal explanation is insufficient for an agent to construct valid calls.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'calls arbitrary MOLD API commands' which provides a general purpose, but it's vague about what specific resources or operations it targets. It doesn't differentiate from siblings like mold_call_debug or mold_autoRegisterApis, leaving ambiguity about when to use this versus more specialized tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. With siblings like mold_listApisMeta or mold_startVirtualMachine that handle specific operations, the description lacks any indication of appropriate contexts, prerequisites, or exclusions for this generic API caller.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ycyun/ablestack-MCP-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server