create_order
Create a new work order in Shopmonkey by specifying customer, vehicle, status, and location details to initiate automotive service management.
Instructions
Create a new work order in Shopmonkey.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customerId | No | Customer ID to associate with the order | |
| vehicleId | No | Vehicle ID to associate with the order | |
| status | No | Initial order status (e.g., estimate, work_order) | |
| locationId | No | Location ID for multi-location shops. Defaults to SHOPMONKEY_LOCATION_ID env var if set. |
Implementation Reference
- src/tools/orders.ts:104-112 (handler)The handler implementation for create_order tool.
async create_order(args) { const body = pickFields(args, CREATE_FIELDS); if (!body.locationId) { const defaultId = getDefaultLocationId(); if (defaultId) body.locationId = defaultId; } const data = await shopmonkeyRequest<Order>('POST', '/order', body); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; }, - src/tools/orders.ts:34-45 (schema)The MCP tool definition for create_order, including the input schema.
name: 'create_order', description: 'Create a new work order in Shopmonkey.', inputSchema: { type: 'object' as const, properties: { customerId: { type: 'string', description: 'Customer ID to associate with the order' }, vehicleId: { type: 'string', description: 'Vehicle ID to associate with the order' }, status: { type: 'string', description: 'Initial order status (e.g., estimate, work_order)' }, locationId: { type: 'string', description: 'Location ID for multi-location shops. Defaults to SHOPMONKEY_LOCATION_ID env var if set.' }, }, }, },