Skip to main content
Glama

timeout-test

Test timeout prevention by running for a specified duration to verify system stability and response handling under controlled conditions.

Instructions

Test timeout prevention by running for a specified duration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
durationYesDuration in milliseconds (minimum 10ms)

Implementation Reference

  • The execute function implementing the core logic of the 'timeout-test' tool: sleeps for the specified duration using setTimeout in steps, reports progress, and returns a summary of the test.
    execute: async (args, onProgress) => {
      const duration = args.duration as number;
      const steps = Math.ceil(duration / 5000); // Progress every 5 seconds
      const stepDuration = duration / steps;
      const startTime = Date.now();
      
      const results: string[] = [];
      results.push(`Starting timeout test for ${duration}ms (${duration/1000}s)`);
      
      for (let i = 1; i <= steps; i++) {
        await new Promise(resolve => setTimeout(resolve, stepDuration));
        const elapsed = Date.now() - startTime;
        results.push(`Step ${i}/${steps} completed - Elapsed: ${Math.round(elapsed/1000)}s`);
      }
      
      const totalElapsed = Date.now() - startTime;
      results.push(`\nTimeout test completed successfully!`);
      results.push(`Target duration: ${duration}ms`);
      results.push(`Actual duration: ${totalElapsed}ms`);
      
      return results.join('\n');
    }
  • Zod input schema for the 'timeout-test' tool, defining the 'duration' parameter.
    const timeoutTestArgsSchema = z.object({
      duration: z.number().min(10).describe("Duration in milliseconds (minimum 10ms)"),
    });
  • Registration of the 'timeoutTestTool' by pushing it to the toolRegistry alongside other tools.
    toolRegistry.push(
      askGeminiTool,
      pingTool,
      helpTool,
      brainstormTool,
      fetchChunkTool,
      timeoutTestTool
    );
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 states the tool 'runs for a specified duration' to test timeout prevention, implying it simulates a long-running process. However, it lacks details on what 'timeout prevention' entails (e.g., whether it actively prevents timeouts or just measures them), potential side effects (e.g., resource consumption), or expected outcomes (e.g., success/failure indicators). 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.

Conciseness5/5

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

The description is appropriately sized and front-loaded: a single, clear sentence ('Test timeout prevention by running for a specified duration') that conveys the core purpose without unnecessary words. Every part of the sentence earns its place by specifying the action and key parameter.

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 (a tool that simulates runtime behavior), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'timeout prevention' means in practice, what the tool returns (e.g., a success message, error, or performance data), or how it interacts with system timeouts. For a tool with no structured data to rely on, this leaves critical gaps for an AI agent.

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 input schema has 100% description coverage, with the 'duration' parameter fully documented in the schema (type: number, minimum: 10ms). The description adds no additional meaning beyond the schema, as it only mentions 'specified duration' without clarifying units or constraints. With high schema coverage, the baseline is 3, and the description doesn't compensate with extra insights.

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: 'Test timeout prevention by running for a specified duration.' It uses specific verbs ('test', 'running') and identifies the resource/action (timeout prevention with duration). However, it doesn't distinguish from siblings like 'ping' (which might also test responsiveness) or 'Help' (which might provide timeout info), so it's not a perfect 5.

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 doesn't mention sibling tools (e.g., 'ping' for quick checks, 'ask-gemini' for AI queries) or specify use cases like debugging, performance testing, or system monitoring. Without such context, users must infer usage from the purpose alone.

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/jamubc/gemini-mcp-tool'

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