Skip to main content
Glama
orzcls

Gemini CLI MCP Server

by orzcls

timeout-test

Test timeout prevention mechanisms by running processes for specified durations to verify system stability and response handling.

Instructions

Test timeout prevention by running for a specified duration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
durationYesDuration in milliseconds (minimum 10ms)

Implementation Reference

  • The handler implementation for the 'timeout-test' tool. It destructures the duration argument, logs the call, and returns a Promise that resolves after the specified duration using setTimeout, simulating a timeout test.
    case "timeout-test":
        const { duration } = args;
        console.error('[GMCPT] timeout-test tool called with duration: ' + duration + 'ms');
        
        return new Promise((resolve) => {
            setTimeout(() => {
                resolve({
                    content: [{
                        type: "text",
                        text: `Timeout test completed after ${duration}ms`
                    }]
                });
            }, Math.max(10, duration));
        });
  • The schema definition for the 'timeout-test' tool, specifying the name, description, and input schema requiring a 'duration' number parameter (minimum 10ms). This schema is returned by the ListTools endpoint.
    {
        name: "timeout-test",
        description: "Test timeout prevention by running for a specified duration",
        inputSchema: {
            type: "object",
            properties: {
                duration: {
                    type: "number",
                    minimum: 10,
                    description: "Duration in milliseconds (minimum 10ms)"
                }
            },
            required: ["duration"]
        }
    }
  • Registration of the ListTools request handler, which exposes the 'timeout-test' tool schema (included in the 'tools' array) to MCP clients.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
        return { 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/orzcls/gemini-mcp-tool-windows-fixed'

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