test_connection
Verify connectivity to the Autotask API to ensure the system can access and retrieve PSA data for contract analysis, ticket tracking, and project monitoring.
Instructions
Test the connection to Autotask API
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- Core handler function that implements the test_connection tool. Ensures Autotask client initialization and tests connectivity via a simple accounts.get(0) API call, returning true on success.async testConnection(): Promise<boolean> { try { const client = await this.ensureClient(); // Try to get account with ID 0 as a connection test const result = await client.accounts.get(0); this.logger.info('Connection test successful:', { hasData: !!result.data, resultType: typeof result }); return true; } catch (error) { this.logger.error('Connection test failed:', error); return false; } }
- src/handlers/tool.handler.ts:1068-1074 (handler)Tool dispatch handler in AutotaskToolHandler.callTool() that routes test_connection calls to AutotaskService.testConnection() and prepares the MCP-formatted response.case 'test_connection': const connectionResult = await this.autotaskService.testConnection(); result = { success: connectionResult }; message = connectionResult ? 'Successfully connected to Autotask API' : 'Connection failed: Unable to connect to Autotask API'; break;
- src/handlers/tool.handler.ts:43-50 (registration)Tool registration in AutotaskToolHandler.listTools() array, defining the tool name, description, and input schema for MCP tool listing.name: 'test_connection', description: 'Test the connection to Autotask API', inputSchema: { type: 'object', properties: {}, required: [] } },
- src/handlers/tool.handler.ts:45-50 (schema)Input schema definition for test_connection tool: empty object schema indicating no input parameters required.inputSchema: { type: 'object', properties: {}, required: [] } },