Jake Shore f8e0b3246f feat: Complete Acuity Scheduling MCP server with 40+ tools and 14 React apps
- Full API client with Basic Auth and OAuth2 support
- 40+ tools across 10 categories (appointments, availability, clients, calendars, products, forms, labels, webhooks, coupons, blocks)
- 14 interactive React-based MCP apps for rich UI experiences
- Comprehensive error handling and pagination
- TypeScript implementation with full type definitions
- Complete documentation and examples
2026-02-12 17:41:55 -05:00

54 lines
1.4 KiB
TypeScript

import { z } from 'zod';
import { AcuityClient } from '../clients/acuity.js';
export function createWebhooksTools(client: AcuityClient) {
return {
acuity_list_webhooks: {
description: 'List all webhooks',
inputSchema: z.object({}),
handler: async () => {
const webhooks = await client.listWebhooks();
return {
content: [{
type: 'text',
text: JSON.stringify(webhooks, null, 2)
}]
};
}
},
acuity_create_webhook: {
description: 'Create a new webhook',
inputSchema: z.object({
event: z.string().describe('Event type (e.g., appointment.scheduled, appointment.canceled)'),
url: z.string().url().describe('Webhook URL')
}),
handler: async (args: any) => {
const webhook = await client.createWebhook(args);
return {
content: [{
type: 'text',
text: JSON.stringify(webhook, null, 2)
}]
};
}
},
acuity_delete_webhook: {
description: 'Delete a webhook',
inputSchema: z.object({
id: z.number().describe('Webhook ID')
}),
handler: async (args: any) => {
await client.deleteWebhook(args.id);
return {
content: [{
type: 'text',
text: JSON.stringify({ success: true, message: 'Webhook deleted' })
}]
};
}
}
};
}