create_vehicle
Add a new vehicle to Shopmonkey, optionally linking it to a customer. Specify details like year, make, model, VIN, and mileage to create a vehicle record.
Instructions
Add a new vehicle to Shopmonkey, optionally linked to a customer.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customerId | No | Customer ID to associate with the vehicle | |
| year | No | Vehicle model year | |
| make | No | Vehicle make (e.g., Toyota, Ford) | |
| model | No | Vehicle model (e.g., Camry, F-150) | |
| vin | No | Vehicle Identification Number | |
| licensePlate | No | License plate number | |
| color | No | Vehicle color | |
| mileage | No | Current mileage |
Implementation Reference
- src/tools/vehicles.ts:92-96 (handler)The `create_vehicle` handler function, which takes the provided arguments, filters them using `pickFields` and `ALLOWED_FIELDS`, and makes a POST request to `/vehicle`.
async create_vehicle(args) { const body = pickFields(args, ALLOWED_FIELDS); const data = await shopmonkeyRequest<Vehicle>('POST', '/vehicle', body); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; }, - src/tools/vehicles.ts:27-42 (schema)The definition of the `create_vehicle` tool, including its name, description, and input schema.
name: 'create_vehicle', description: 'Add a new vehicle to Shopmonkey, optionally linked to a customer.', inputSchema: { type: 'object' as const, properties: { customerId: { type: 'string', description: 'Customer ID to associate with the vehicle' }, year: { type: 'number', description: 'Vehicle model year' }, make: { type: 'string', description: 'Vehicle make (e.g., Toyota, Ford)' }, model: { type: 'string', description: 'Vehicle model (e.g., Camry, F-150)' }, vin: { type: 'string', description: 'Vehicle Identification Number' }, licensePlate: { type: 'string', description: 'License plate number' }, color: { type: 'string', description: 'Vehicle color' }, mileage: { type: 'number', description: 'Current mileage' }, }, }, },