timeout-test
Validate timeout prevention mechanisms by executing operations for a specified duration. Use this tool to ensure system stability and responsiveness during prolonged tasks.
Instructions
Test timeout prevention by running for a specified duration
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| duration | Yes | Duration in milliseconds (minimum 10ms) |
Input Schema (JSON Schema)
{
"properties": {
"duration": {
"description": "Duration in milliseconds (minimum 10ms)",
"minimum": 10,
"type": "number"
}
},
"required": [
"duration"
],
"type": "object"
}
Implementation Reference
- lib/fixed-mcp-tool.js:389-402 (handler)The handler function for the 'timeout-test' tool. It destructures the 'duration' from arguments, logs the call, and returns a Promise that resolves after the specified duration using setTimeout, confirming completion.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)); });
- lib/fixed-mcp-tool.js:199-213 (schema)The schema definition for the 'timeout-test' tool, specifying the name, description, and inputSchema requiring a 'duration' number (minimum 10ms).{ 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"] } }
- lib/fixed-mcp-tool.js:217-219 (registration)Registers the ListToolsRequest handler which returns the array of tool definitions, including 'timeout-test'.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });