delete_order
Permanently delete a work order from the Shopmonkey system after confirming the action. This operation cannot be undone.
Instructions
WARNING: Permanently deletes a work order. This cannot be undone. You must pass confirm: true to execute.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The work order ID to delete | |
| confirm | Yes | Must be set to true to confirm deletion. This is a safety guard. |
Implementation Reference
- src/tools/orders.ts:121-131 (handler)Handler implementation for 'delete_order' which performs the DELETE request.
async delete_order(args) { if (!args.id) return { content: [{ type: 'text', text: 'Error: id is required' }], isError: true }; if (args.confirm !== true) { return { content: [{ type: 'text', text: 'Error: Deleting a work order is permanent and cannot be undone. Pass confirm: true to proceed.' }], isError: true, }; } await shopmonkeyRequest<void>('DELETE', `/order/${sanitizePathParam(String(args.id))}`); return { content: [{ type: 'text', text: `Work order ${args.id} deleted successfully.` }] }; }, - src/tools/orders.ts:61-71 (schema)Schema definition for the 'delete_order' tool.
name: 'delete_order', description: 'WARNING: Permanently deletes a work order. This cannot be undone. You must pass confirm: true to execute.', inputSchema: { type: 'object' as const, properties: { id: { type: 'string', description: 'The work order ID to delete' }, confirm: { type: 'boolean', description: 'Must be set to true to confirm deletion. This is a safety guard.' }, }, required: ['id', 'confirm'], }, },