test_webhook_connection
Verify webhook connectivity between Claude Desktop and Make.com to ensure reliable automation scenario execution.
Instructions
测试与Make.com webhook的连接
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:206-270 (handler)The main handler function for the 'test_webhook_connection' tool. It sends a test POST request to the configured Make.com webhook URL and returns a formatted response indicating success or failure.private async testWebhookConnection() { if (!this.makeWebhookUrl) { return { content: [ { type: 'text', text: '❌ Webhook URL未配置\n请在.env文件中设置MAKE_WEBHOOK_URL' } ] }; } try { const testPayload = { action: 'test_connection', data: { test: true }, timestamp: new Date().toISOString(), source: 'claude-mcp-test' }; const response = await axios.post(this.makeWebhookUrl, testPayload, { headers: { 'Content-Type': 'application/json' }, timeout: 10000 }); return { content: [ { type: 'text', text: `✅ Webhook连接测试成功\n` + `响应状态: ${response.status}\n` + `响应时间: ${new Date().toISOString()}\n` + `Make.com scenario可以正常接收数据` } ] }; } catch (error) { if (axios.isAxiosError(error)) { return { content: [ { type: 'text', text: `❌ Webhook连接测试失败\n` + `错误: ${error.response?.status} - ${error.response?.statusText}\n` + `请检查:\n` + `1. Webhook URL是否正确\n` + `2. Make.com scenario是否已启用\n` + `3. 网络连接是否正常` } ] }; } return { content: [ { type: 'text', text: `❌ 连接测试失败: ${error instanceof Error ? error.message : '未知错误'}` } ] }; } }
- src/server.ts:76-84 (registration)Registers the 'test_webhook_connection' tool in the ListTools response, including its name, description, and input schema (which requires no parameters).{ name: 'test_webhook_connection', description: '测试与Make.com webhook的连接', inputSchema: { type: 'object', properties: {}, additionalProperties: false } }
- src/server.ts:99-100 (registration)Dispatches calls to the 'test_webhook_connection' handler in the CallToolRequestHandler switch statement.case 'test_webhook_connection': return await this.testWebhookConnection();
- src/server.ts:79-83 (schema)Defines the input schema for the tool, which accepts an empty object with no required properties.inputSchema: { type: 'object', properties: {}, additionalProperties: false }