batch_update_items
Batch update multiple items in a Skema CMS collection by specifying the collection name and an array of items with their IDs and modified data.
Instructions
Met à jour plusieurs items en une seule requête
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection | Yes | Nom de la collection | |
| items | Yes | Tableau d'items avec leur ID et les données à modifier |
Implementation Reference
- src/tools.ts:213-237 (schema)Tool definition for 'batch_update_items' with inputSchema requiring 'collection' (string) and 'items' (array of objects each with required 'id')
{ name: "batch_update_items", description: "Met à jour plusieurs items en une seule requête", inputSchema: { type: "object", properties: { collection: { type: "string", description: "Nom de la collection", }, items: { type: "array", items: { type: "object", properties: { id: { type: "string" }, }, required: ["id"], }, description: "Tableau d'items avec leur ID et les données à modifier", }, }, required: ["collection", "items"], }, }, - src/index.ts:146-153 (handler)Handler case 'batch_update_items' extracting 'collection' and 'items' from args, then calling skema.batchUpdate(collection, items)
case "batch_update_items": { const { collection, items } = args as { collection: string; items: Array<{ id: string } & Record<string, unknown>>; }; result = await skema.batchUpdate(collection, items); break; } - src/skema-client.ts:171-178 (helper)Helper function 'batchUpdate' that calls the remote MCP API with 'batch_update_items' tool name, passing collection and items
/** * Met a jour plusieurs items en une seule requete */ export const batchUpdate = ( collection: string, items: Array<{ id: string } & Record<string, unknown>> ) => mcpCall("batch_update_items", { collection, items }); - src/index.ts:30-32 (registration)Registration of all tools (including batch_update_items) via server.setRequestHandler(ListToolsRequestSchema) using the imported tools array
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools, }));