Skip to main content
Glama

todoist_test_performance

Measure Todoist API performance and response times through automated test iterations to identify optimization opportunities.

Instructions

Measure performance and response times of Todoist API operations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
iterationsNoNumber of iterations to run for each test (default: 5)

Implementation Reference

  • The main handler function that implements the todoist_test_performance tool. It measures API response times for getProjects and getTasks over multiple iterations, computing average, min, max times.
    export async function handleTestPerformance( todoistClient: TodoistApi, args?: { iterations?: number } ): Promise<{ averageResponseTime: number; minResponseTime: number; maxResponseTime: number; iterations: number; results: Array<{ operation: string; time: number }>; }> { const iterations = args?.iterations || 5; const results: Array<{ operation: string; time: number }> = []; for (let i = 0; i < iterations; i++) { // Test project retrieval const projectStart = Date.now(); await todoistClient.getProjects(); results.push({ operation: "getProjects", time: Date.now() - projectStart }); // Test task retrieval const taskStart = Date.now(); await todoistClient.getTasks(); results.push({ operation: "getTasks", time: Date.now() - taskStart }); } const times = results.map((r) => r.time); const averageResponseTime = times.reduce((sum, t) => sum + t, 0) / times.length; const minResponseTime = Math.min(...times); const maxResponseTime = Math.max(...times); return { averageResponseTime, minResponseTime, maxResponseTime, iterations, results, }; }
  • Tool schema definition including name, description, and input schema for iterations parameter.
    export const TEST_PERFORMANCE_TOOL: Tool = { name: "todoist_test_performance", description: "Measure performance and response times of Todoist API operations", inputSchema: { type: "object", properties: { iterations: { type: "number", description: "Number of iterations to run for each test (default: 5)", default: 5, }, }, }, };
  • src/index.ts:363-369 (registration)
    Dispatch case in the main tool handler switch statement that routes the tool call to the handleTestPerformance function.
    case "todoist_test_performance": const performanceResult = await handleTestPerformance( apiClient, args as { iterations?: number } ); result = JSON.stringify(performanceResult, null, 2); break;

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/greirson/mcp-todoist'

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