{"openapi":"3.1.0","info":{"title":"Paint Doctors Public API","version":"1.0.0","description":"For an assistant acting for a customer: book a free estimate, ask about painting work, or use the MCP server. Plus the site's health."},"servers":[{"url":"https://paint-doctors.com"}],"paths":{"/health":{"get":{"summary":"Worker health","operationId":"getHealth","responses":{"200":{"description":"Service status and the time.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/book":{"post":{"summary":"Book a free estimate for a customer","operationId":"bookEstimate","description":"Books a free, no-deposit estimate. Paint Doctors calls the customer to set a time to come look; pass the time they would like in preferred_time. Creates no price.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["customer_name","customer_phone","customer_email","address_street","address_city"],"additionalProperties":false,"properties":{"customer_name":{"type":"string","description":"The customer name, as they gave it."},"customer_phone":{"type":"string","description":"Best number to call them on. Pass it as they said it."},"address_street":{"type":"string","description":"Street address of the property to be estimated."},"address_city":{"type":"string","description":"City of the property. Baldwin or Mobile County, Alabama."},"service":{"type":"string","enum":["interior","exterior","cabinets","commercial","sheetrock","color_consultation"],"description":"What the job is. Defaults to interior."},"preferred_time":{"type":"string","description":"When the customer would like someone to come by, in their words."},"job_details":{"type":"string","description":"What the customer described, in THEIR words."},"customer_email":{"type":"string","description":"The customer email address. The confirmation email goes there."},"idempotency_key":{"type":"string","description":"Optional. Repeat it to make a retry safe."},"is_test":{"type":"boolean","description":"Set true ONLY when exercising this tool rather than booking for a real person. The details are checked and nothing is booked or sent to Paint Doctors. Never set it for a real customer."}}}}}},"responses":{"200":{"description":"Booked, or checked on a dry run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingResult"}}}},"400":{"description":"The body is not one JSON object, a required field is missing, the phone number is not a 10-digit US number, the email is not valid, or service is not one of the listed values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingError"}}}},"409":{"description":"The same booking is already being made under this idempotency_key. Retry in a moment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingError"}}}},"429":{"description":"Too many bookings from this caller just now. Retry-After says when.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingError"}}}},"502":{"description":"Paint Doctors could not be reached. Nothing was booked; call the number in the error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingError"}}}}}}},"/api/ask":{"post":{"summary":"Ask Paint Doctors about painting work","operationId":"askPaintDoctors","description":"Answers from their documented process and product knowledge. Never returns a price.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["question"],"additionalProperties":false,"properties":{"question":{"type":"string","description":"The painting question, in the customer’s words."},"service":{"type":"string","enum":["interior","exterior","cabinets","commercial","sheetrock","color_consultation"],"description":"Optional hint about which kind of work this is about."}}}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"description":"The body is not one JSON object, it has no question, or service is not one of the listed values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many questions just now. Retry-After says when.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"It could not answer right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/mcp":{"post":{"summary":"MCP server (JSON-RPC 2.0)","operationId":"mcp","description":"Model Context Protocol endpoint. Methods: initialize, tools/list, tools/call, ping. Tools: book_estimate, ask_paint_doctors.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcRequest"}}}},"responses":{"200":{"description":"A JSON-RPC response: result or error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcResponse"}}}},"202":{"description":"A notification was accepted; no body."},"400":{"description":"Parse error, invalid request, batch request, or an unsupported MCP-Protocol-Version header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcResponse"}}}},"413":{"description":"The body is over 64 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcResponse"}}}}}}}},"components":{"schemas":{"BookingResult":{"type":"object","required":["booked"],"properties":{"booked":{"type":"boolean","description":"True when the estimate is booked."},"booking_id":{"type":"string","description":"The booking reference."},"free":{"type":"boolean"},"deposit_required":{"type":"boolean"},"what_happens_next":{"type":"string"},"test":{"type":"boolean","description":"True on a dry run; nothing was booked."},"details_valid":{"type":"boolean"},"note":{"type":"string"}}},"BookingError":{"type":"object","required":["booked","error"],"properties":{"booked":{"type":"boolean","const":false},"error":{"type":"string"}}},"Answer":{"type":"object","required":["answer","phone"],"properties":{"answer":{"type":"string","description":"The answer, in plain sentences."},"phone":{"type":"string","description":"The number to call for anything the answer does not settle."},"quotes":{"type":"string","description":"How estimates work."}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}},"JsonRpcRequest":{"type":"object","required":["jsonrpc","method"],"properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"method":{"type":"string","enum":["initialize","ping","tools/list","tools/call","notifications/initialized"]},"params":{"type":"object"}}},"JsonRpcResponse":{"type":"object","required":["jsonrpc","id"],"properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"oneOf":[{"type":"string"},{"type":"integer"},{"type":"null"}]},"result":{"type":"object"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}}}}}