Skip to main content
Glama
test-get-list-details.cjsβ€’1.99 kB
/** * Quick test for the get-list-details tool to verify our fix */ const dispatcher = require('../build/handlers/tools/dispatcher.js'); const registry = require('../build/handlers/tools/registry.js'); const attioClient = require('../build/api/attio-client.js'); const dotenv = require('dotenv'); // Load environment variables dotenv.config(); // Initialize the Attio client with the API key from environment variables const apiKey = process.env.ATTIO_API_KEY; if (!apiKey) { console.error('ERROR: You must set ATTIO_API_KEY environment variable to run this test'); process.exit(1); } // Initialize the API client attioClient.initializeAttioClient(apiKey); // Create a test function to run the test async function testGetListDetails() { try { // Test with a sample list ID - replace with a valid list ID if you have one // You can create a list in Attio or use an existing one const listId = process.argv[2]; // Take list ID from command line argument if (!listId) { console.error('Please provide a list ID as a command line argument'); console.error('Usage: node test-get-list-details.js <list-id>'); process.exit(1); } console.log(`Getting details for list with ID: ${listId}`); // Create a mock request to test the tool const mockRequest = { params: { name: 'get-list-details', arguments: { listId: listId } } }; // Execute the request through the dispatcher const response = await dispatcher.executeToolRequest(mockRequest); console.log("Response:", JSON.stringify(response, null, 2)); // Check if we got an error if (response.isError) { console.error("ERROR:", response.error); if (response.error.details) { console.error("Details:", response.error.details); } } } catch (error) { console.error('Unexpected error:', error); } } // Run the test testGetListDetails().catch(console.error);

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/kesslerio/attio-mcp-server'

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