Skip to main content
Glama
ycyun

ABLESTACK MOLD MCP Server

by ycyun

비동기 잡 완료 대기

mold_waitForJob

Waits for an async job to complete or fail by periodically polling queryAsyncJobResult until the job finishes.

Instructions

queryAsyncJobResult를 주기적으로 호출하여 완료(1)/실패(2)까지 대기.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobidYes
timeoutMsNo
intervalMsNo

Implementation Reference

  • Handler function that polls the asynchronous job status using queryAsyncJobResult until it completes (status 1) or fails (status 2), with configurable timeout and polling interval.
    async ({ jobid, timeoutMs = 60000, intervalMs = 2000 }) => {
      const start = Date.now();
      while (true) {
        const data = await callApi("queryAsyncJobResult", { jobid });
        const resp = data.queryasyncjobresultresponse ?? data.queryasyncjobresult ?? data;
        const status = resp.jobstatus;
        if (status === 1 || status === 2) {
          return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
        }
        if (Date.now() - start > timeoutMs) throw new Error(`timeout after ${timeoutMs}ms`);
        await new Promise((r) => setTimeout(r, intervalMs));
      }
    }
  • Registration of the mold_waitForJob tool within the registerCoreTools function, including title, description, input schema, and inline handler.
    server.registerTool(
      "mold_waitForJob",
      {
        title: "비동기 잡 완료 대기",
        description: "queryAsyncJobResult를 주기적으로 호출하여 완료(1)/실패(2)까지 대기.",
        inputSchema: {
          jobid: z.string(),
          timeoutMs: z.number().int().optional(),
          intervalMs: z.number().int().optional(),
        },
      },
      async ({ jobid, timeoutMs = 60000, intervalMs = 2000 }) => {
        const start = Date.now();
        while (true) {
          const data = await callApi("queryAsyncJobResult", { jobid });
          const resp = data.queryasyncjobresultresponse ?? data.queryasyncjobresult ?? data;
          const status = resp.jobstatus;
          if (status === 1 || status === 2) {
            return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
          }
          if (Date.now() - start > timeoutMs) throw new Error(`timeout after ${timeoutMs}ms`);
          await new Promise((r) => setTimeout(r, intervalMs));
        }
      }
    );
  • Zod input schema defining jobid (required string), timeoutMs and intervalMs (optional integers).
    inputSchema: {
      jobid: z.string(),
      timeoutMs: z.number().int().optional(),
      intervalMs: z.number().int().optional(),
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the polling behavior and outcome states (completion/failure), which is useful. However, it lacks critical details: it does not specify default or recommended values for timeoutMs and intervalMs, error handling for network issues, or what happens after timeout. For a tool with no annotation coverage, this leaves significant gaps in understanding its operation.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's function. It is front-loaded with the key action and outcome, with no redundant or verbose language. Every word contributes to understanding the polling behavior and end states.

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 tool's complexity (asynchronous polling with timeout and interval controls), no annotations, no output schema, and 0% schema description coverage, the description is incomplete. It covers the basic polling mechanism but misses details on parameter usage, error scenarios, and result interpretation. For a tool that manages job states, more context is needed to use it effectively.

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 'queryAsyncJobResult' and '주기적으로' (periodically), which hints at the jobid and intervalMs parameters, but does not explain their semantics, units, or constraints. The timeoutMs parameter is not referenced at all. With 3 parameters and no schema descriptions, the description adds minimal value beyond naming the core action.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'queryAsyncJobResult를 주기적으로 호출하여 완료(1)/실패(2)까지 대기' translates to 'periodically call queryAsyncJobResult to wait until completion (1)/failure (2).' This specifies the verb (wait by polling), resource (async job), and outcome states. It distinguishes from siblings like mold_call or mold_startVirtualMachine by focusing on job monitoring rather than execution or configuration.

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?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., needing a job ID from another operation), exclusions, or sibling tools. Usage is implied only by the action described, with no explicit context for selection among related tools like mold_call or mold_startVirtualMachine.

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