update_order
Modify existing work orders by updating status, customer, or vehicle information in the Shopmonkey system.
Instructions
Update fields on an existing work order.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The work order ID to update | |
| status | No | New order status | |
| customerId | No | New customer ID | |
| vehicleId | No | New vehicle ID |
Implementation Reference
- src/tools/orders.ts:114-119 (handler)Handler function for update_order tool.
async update_order(args) { if (!args.id) return { content: [{ type: 'text', text: 'Error: id is required' }], isError: true }; const body = pickFields(args, UPDATE_FIELDS); const data = await shopmonkeyRequest<Order>('PATCH', `/order/${sanitizePathParam(String(args.id))}`, body); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; }, - src/tools/orders.ts:46-59 (schema)Definition of update_order tool including schema.
{ name: 'update_order', description: 'Update fields on an existing work order.', inputSchema: { type: 'object' as const, properties: { id: { type: 'string', description: 'The work order ID to update' }, status: { type: 'string', description: 'New order status' }, customerId: { type: 'string', description: 'New customer ID' }, vehicleId: { type: 'string', description: 'New vehicle ID' }, }, required: ['id'], }, },