Skip to main content
Glama

wait

Pause execution for a specified duration (0-300 seconds) to synchronize tasks, ensuring dependent processes complete before proceeding. Ideal for task orchestration and workflow management.

Instructions

Wait for a specified number of seconds, useful for waiting for other tasks to finish

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
secondsYesThe number of seconds to wait (0-300)

Implementation Reference

  • The execute handler for the 'wait' tool, which waits for the specified seconds, reports progress every 10%, and returns a success message.
    execute: async (args, { reportProgress }) => {
      const { seconds } = args;
      const ms = seconds * 1000;
    
      console.log(`Waiting for ${seconds} seconds...`);
    
      // Report progress in 10% increments
      const interval = ms / 10;
    
      for (let i = 0; i < 10; i++) {
        await sleep(interval);
        reportProgress({
          progress: (i + 1) * 10,
          total: 100,
        });
      }
    
      return `Waited for ${seconds} seconds successfully.`;
    },
  • Zod schema defining the input parameters for the 'wait' tool: seconds (number, 0-30000).
    parameters: z.object({
      seconds: z.number().min(0).max(30000).describe("The number of seconds to wait (0-30000)"),
    }),
  • src/index.ts:21-46 (registration)
    Registration of the 'wait' tool using server.addTool, including name, description, schema, and handler.
    server.addTool({
      name: "wait",
      description: "Wait for a specified number of seconds, useful for waiting for other tasks to finish",
      parameters: z.object({
        seconds: z.number().min(0).max(30000).describe("The number of seconds to wait (0-30000)"),
      }),
      execute: async (args, { reportProgress }) => {
        const { seconds } = args;
        const ms = seconds * 1000;
    
        console.log(`Waiting for ${seconds} seconds...`);
    
        // Report progress in 10% increments
        const interval = ms / 10;
    
        for (let i = 0; i < 10; i++) {
          await sleep(interval);
          reportProgress({
            progress: (i + 1) * 10,
            total: 100,
          });
        }
    
        return `Waited for ${seconds} seconds successfully.`;
      },
    });
  • Helper sleep function used by the wait handler to pause execution.
    function sleep(ms: number): Promise<void> {
      return new Promise(resolve => setTimeout(resolve, ms));
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool's utility but fails to describe key behavioral traits such as whether the wait is blocking, if it can be interrupted, error handling, or side effects. This is a significant gap for a tool with no annotation coverage.

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 appropriately sized and front-loaded, consisting of a single, efficient sentence that conveys the core purpose. There is no wasted text, though it could be slightly more structured for clarity.

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 simplicity and 100% schema coverage, the description is somewhat adequate but incomplete. It lacks details on behavioral aspects (e.g., blocking nature, error handling) and output (no output schema provided), which are important for a wait tool with no annotations.

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

Parameters3/5

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

The schema description coverage is 100%, with the parameter 'seconds' fully documented in the schema (type, range, description). The description adds no additional meaning beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage without extra param info.

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 with a specific verb ('wait') and resource ('seconds'), and explains its utility ('useful for waiting for other tasks to finish'). It distinguishes the tool's function effectively, though it lacks explicit differentiation from siblings (none provided).

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

Usage Guidelines3/5

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

The description implies usage context ('waiting for other tasks to finish'), providing some guidance on when to use the tool. However, it does not offer explicit alternatives, exclusions, or detailed prerequisites, leaving room for clearer operational guidelines.

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

Related 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/automation-ai-labs/mcp-wait'

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