88 lines
3.1 KiB
JavaScript
88 lines
3.1 KiB
JavaScript
import { z } from 'zod';
|
|
export function registerRestaurantTools(client) {
|
|
return [
|
|
{
|
|
name: 'toast_get_restaurant_info',
|
|
description: 'Get restaurant information and configuration',
|
|
inputSchema: z.object({}),
|
|
execute: async (args) => {
|
|
const result = await client.restaurant.getInfo();
|
|
return {
|
|
content: [
|
|
{
|
|
type: 'text',
|
|
text: JSON.stringify(result, null, 2),
|
|
},
|
|
],
|
|
};
|
|
},
|
|
},
|
|
{
|
|
name: 'toast_list_revenue_centers',
|
|
description: 'List all revenue centers for the restaurant',
|
|
inputSchema: z.object({}),
|
|
execute: async (args) => {
|
|
const result = await client.restaurant.listRevenueCenters();
|
|
return {
|
|
content: [
|
|
{
|
|
type: 'text',
|
|
text: JSON.stringify(result, null, 2),
|
|
},
|
|
],
|
|
};
|
|
},
|
|
},
|
|
{
|
|
name: 'toast_list_dining_options',
|
|
description: 'List all dining options (dine-in, takeout, delivery, etc.)',
|
|
inputSchema: z.object({}),
|
|
execute: async (args) => {
|
|
const result = await client.restaurant.listDiningOptions();
|
|
return {
|
|
content: [
|
|
{
|
|
type: 'text',
|
|
text: JSON.stringify(result, null, 2),
|
|
},
|
|
],
|
|
};
|
|
},
|
|
},
|
|
{
|
|
name: 'toast_list_service_areas',
|
|
description: 'List all service areas (sections) in the restaurant',
|
|
inputSchema: z.object({}),
|
|
execute: async (args) => {
|
|
const result = await client.restaurant.listServiceAreas();
|
|
return {
|
|
content: [
|
|
{
|
|
type: 'text',
|
|
text: JSON.stringify(result, null, 2),
|
|
},
|
|
],
|
|
};
|
|
},
|
|
},
|
|
{
|
|
name: 'toast_list_tables',
|
|
description: 'List all tables, optionally filtered by service area',
|
|
inputSchema: z.object({
|
|
serviceAreaGuid: z.string().optional().describe('Service area GUID (optional)'),
|
|
}),
|
|
execute: async (args) => {
|
|
const result = await client.restaurant.listTables(args.serviceAreaGuid);
|
|
return {
|
|
content: [
|
|
{
|
|
type: 'text',
|
|
text: JSON.stringify(result, null, 2),
|
|
},
|
|
],
|
|
};
|
|
},
|
|
},
|
|
];
|
|
}
|
|
//# sourceMappingURL=restaurant-tools.js.map
|