@atlas-kitchen/atlas-mcp
Version:
Model Context Protocol server for Atlas restaurant management system - enables Claude to interact with restaurant orders, menus, and reports
46 lines • 1.99 kB
JavaScript
import { z } from 'zod';
const GetItemsSchema = z.object({
search: z.string().optional(),
brandId: z.number().optional(),
archived: z.boolean().optional(),
page: z.number().min(1).default(1),
perPage: z.number().min(1).max(100).default(20),
});
export function createMenuTools(client) {
return [
{
name: 'atlas_get_items',
description: 'Search and list item catalog entries with pagination. Returns item ID, label, price, type, and tags. Use the search parameter to find items by name. Default 20 items per page, max 100.',
inputSchema: {
type: 'object',
properties: {
search: { type: 'string', description: 'Search term for items' },
brandId: { type: 'number', description: 'Brand ID to filter items' },
archived: { type: 'boolean', description: 'Include archived items (default: false)' },
page: { type: 'number', description: 'Page number for pagination (starts at 1, default: 1)' },
perPage: { type: 'number', description: 'Items per page (1-100, default: 20)' },
},
},
handler: async (input) => {
const filters = GetItemsSchema.parse(input);
try {
const response = await client.getItems(filters);
return {
success: true,
items: response.items,
totalCount: response.totalCount,
page: response.page,
perPage: response.perPage,
};
}
catch (error) {
return {
success: false,
error: error.message || 'Failed to fetch items',
};
}
},
},
];
}
//# sourceMappingURL=menu.js.map