Skip to main content
Glama

ClickUp MCP

by TwoFeetUp
test-date-conversion.js1.97 kB
/** * Test automatic date conversion in search_tasks * Verifies that ISO date strings get converted to Unix timestamps */ import { handleSearchTasks } from './build/tools/task/consolidated-handlers.js'; console.log('=== Testing Automatic Date Conversion ===\n'); // Test 1: ISO date string console.log('Test 1: ISO date string "2024-10-01"'); console.log('Expected: Should convert to Unix timestamp (milliseconds)'); console.log('Testing conversion logic...\n'); // Simulate the conversion that should happen const testDate = "2024-10-01"; const expectedTimestamp = new Date(testDate).getTime().toString(); console.log(`Input: ${testDate}`); console.log(`Expected output: ${expectedTimestamp}`); console.log(`Expected date: ${new Date(parseInt(expectedTimestamp)).toISOString()}\n`); // Test 2: Already a timestamp console.log('Test 2: Already a timestamp (milliseconds)'); const timestampMs = "1696118400000"; console.log(`Input: ${timestampMs}`); console.log(`Expected: Should pass through as-is: ${timestampMs}\n`); // Test 3: Timestamp in seconds (should convert to milliseconds) console.log('Test 3: Timestamp in seconds'); const timestampSec = "1696118400"; const expectedMs = (parseInt(timestampSec) * 1000).toString(); console.log(`Input: ${timestampSec}`); console.log(`Expected: Should convert to milliseconds: ${expectedMs}\n`); // Test 4: Human-readable date console.log('Test 4: Human-readable date "December 25, 2024"'); const humanDate = "December 25, 2024"; const humanTimestamp = new Date(humanDate).getTime().toString(); console.log(`Input: ${humanDate}`); console.log(`Expected output: ${humanTimestamp}`); console.log(`Expected date: ${new Date(parseInt(humanTimestamp)).toISOString()}\n`); console.log('=== Date Conversion Logic Test Complete ===\n'); console.log('Note: The actual API call would use these converted timestamps.'); console.log('The handler should automatically convert date strings before calling the ClickUp API.\n');

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/TwoFeetUp/clickup-mcp'

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