# TechLogic — Complete Engineering & MCP Specification (llms-full.txt) > Comprehensive technical reference for AI coding agents, shop automation builders, and MSO integrators connecting to TechLogic Shop OS via Model Context Protocol (MCP 2025-06-18) and REST API v2. ## 1. Platform Architecture Overview TechLogic unifies mechanical auto repair, collision body & frame operations, parts procurement, and double-entry financial accounting into one browser-native operating system: - **Tab-Wise Keep-Alive Workspace**: Persistent multi-tab workspace bar with 0ms state switching and 50/50 split-view docking across Repair Orders, Collision Supplements, Mobile DVIs, Floor Kanban, Vendor POs, and General Ledger journals. - **8-Stage Floor Production Kanban**: Standardized floor pipeline (`intake`, `teardown`, `parts_hold`, `body_mechanical`, `paint_sublet`, `reassembly`, `adas_qc`, `ready_invoiced`) with technician clock-in/out timers and automated SMS status updates. - **11-Rate Collision Supplement Engine**: Supports per-carrier DRP profiles across Body, Refinish/Blend, Frame/Bench, Structural, Aluminum, Mechanical, Electrical/ADAS, Glass, Paint Materials, Hazardous/Shop Supplies, and Sublet/Towing—paired with CCC ONE, Mitchell, and Audatex PDF OCR import and immutable S01–S09 supplement diffs. - **Penny-Exact Double-Entry General Ledger**: Every invoice, insurance/deductible split receivable, Stripe terminal settlement, vendor AP bill, and parts COGS movement posts balanced debit/credit journal lines (`sum(debits) == sum(credits)`, zero cent drift). --- ## 2. OAuth 2.1 & MCP 2025-06-18 Connection Reference - **MCP Endpoint (Streamable HTTP)**: `https://api.techlogic.app/mcp` - **Protected Resource Metadata (RFC 9728)**: `GET https://api.techlogic.app/.well-known/oauth-protected-resource` - **Authorization Server Metadata (RFC 8414)**: `GET https://api.techlogic.app/.well-known/oauth-authorization-server` - **Dynamic Client Registration (RFC 7591)**: `POST https://api.techlogic.app/oauth/register` - **Authorization Code Grant**: `PKCE S256` required; access tokens carry rooftop `tenant_id`, `location_ids`, and granular RBAC scopes. ### Ready-to-Use MCP Client Configuration (`mcp.json`) ```json { "mcpServers": { "techlogic": { "type": "http", "url": "https://api.techlogic.app/mcp" } } } ``` ### OAuth 2.1 Scope Catalogue - `analytics:read` — Read shop KPIs, ARO velocity, cycle times, and audit logs. - `crm:read`, `crm:write` — Search/manage customers, vehicles, VIN decodes, and QR check-ins. - `ro:read`, `ro:write` — Read/author mechanical repair orders, canned jobs, approvals, and tech punches. - `dispatch:read`, `dispatch:write` — Inspect bay workload and transition 8-stage Kanban cards. - `dvi:read`, `dvi:write` — Read/record inspection findings, wear gauges, DTC analysis, and SMS approval links. - `estimates:read`, `estimates:write` — Parse CCC ONE PDFs, author 11-rate collision estimates, and lock S01/S02 supplements. - `inventory:read`, `inventory:write` — Query bin SKUs, adjust stock, and search MOTOR / OEC CollisionLink catalogs. - `purchasing:read`, `purchasing:write` — Create/submit vendor POs, receive parts, log AP bills, and inspect RO job costing. - `invoicing:read`, `invoicing:write` — Generate customer or split carrier/deductible invoices and send Stripe payment links. - `accounting:read`, `accounting:write` — Read Chart of Accounts, post balanced GL journals, and verify trial balances. - `admin:read` — Inspect multi-location rooftops and RBAC role policy definitions. --- ## 3. REST API v2 Conventions (`https://api.techlogic.app/api/v2`) - **Authentication**: `Authorization: Bearer ` - **Active Rooftop Header**: `X-Shop-Location-ID: loc_01J9Z...` (required for multi-location enterprise tenants when targeting a specific rooftop). - **Safe Mutations**: Pass `Idempotency-Key: ` on `POST` and `PATCH` mutations (invoice generation, PO submission, payment recording, GL journal posting) for 24-hour idempotent replay safety. - **Monetary Precision**: Monetary totals are returned both as integer minor units (`*_cents`) and fixed 2-decimal strings (`"1840.00"`)—never IEEE-754 floats. - **Pagination**: Cursor-based via `?limit=50&cursor=cur_...` returning `{ "data": [...], "next_cursor": "...", "has_more": false }`. ### Representative REST v2 Endpoints - `GET /api/v2/overview` — Daily WIP, open RO count, ARO, effective gross profit %, and bay availability. - `GET /api/v2/repair-orders` / `POST /api/v2/repair-orders` — List or create mechanical repair orders. - `POST /api/v2/repair-orders/{ro_id}/approvals` — Record customer line-item approvals and e-signature metadata. - `POST /api/v2/estimates/import-ccc` — Multipart PDF upload for CCC ONE / Mitchell / Audatex OCR ingestion. - `POST /api/v2/estimates/{estimate_id}/supplements` — Create versioned collision supplement (`S01`, `S02`, ...) across 11 rate buckets. - `POST /api/v2/purchase-orders` — Create and submit vendor POs linked directly to RO/Estimate line items. - `POST /api/v2/invoices` — Issue standard or split insurance-vs-deductible invoices and post balanced GL entries. - `GET /api/v2/accounting/trial-balance` — Verify penny-exact General Ledger balance across asset, liability, equity, revenue, and COGS accounts. --- ## 4. Complete 9-Domain MCP Tool Directory (52 Tools) ### Domain 1: Shop Overview, Analytics & Audit (5 Tools) 1. `get_shop_overview` — Live WIP, open RO count, daily ARO, realized gross margin %, and parts-hold alerts. 2. `get_aro_metrics` — Historical Average Repair Order, labor effective rate, and parts margin trends by date range. 3. `get_technician_workload` — Billed hours vs. clocked hours, bay utilization, and productivity % per technician. 4. `get_cycle_time_report` — Keys-to-keys cycle time breakdown across all 8 shop floor production stages. 5. `query_audit_logs` — Paginated immutable audit log of staff and MCP agent actions filtered by actor or entity. ### Domain 2: Customers, Vehicles & Intake CRM (6 Tools) 6. `search_customers` — Fast fuzzy lookup across customer names, phone numbers, emails, and fleet accounts. 7. `get_customer_profile` — Full customer contact record, linked vehicles, open AR balance, and lifetime spend. 8. `upsert_customer` — Create or update individual or commercial fleet customer records. 9. `decode_vin_specs` — Decode 17-digit VIN for year, make, model, trim, engine code, transmission, and fluid capacities. 10. `get_vehicle_history` — Chronological service, DVI, collision supplement, and mileage history for a vehicle. 11. `create_intake_checkin` — Generate a QR/mobile drop-off or preliminary collision estimate check-in session. ### Domain 3: Mechanical Repair Orders & Floor Dispatch (7 Tools) 12. `list_repair_orders` — Filter active or archived ROs by stage, technician, bay, promise time, or approval state. 13. `get_repair_order` — Complete RO line items, labor hours, parts retail/cost, sublets, fees, and customer auth status. 14. `create_repair_order` — Open a new mechanical RO for a customer and vehicle with advisor concern notes. 15. `update_ro_stage` — Transition an RO across the 8-stage floor Kanban and optionally trigger SMS updates. 16. `apply_canned_job` — Populate pre-built service package lines (labor, parts, shop supplies) onto an active RO. 17. `set_job_approval` — Record approved or deferred status per job line with authorization audit metadata. 18. `record_tech_clock_punch` — Clock a technician in or out of a specific RO labor operation. ### Domain 4: Digital Vehicle Inspections (DVI) & Diagnostics (5 Tools) 19. `list_dvi_templates` — List configured multi-point safety, Euro, brake/tire, and teardown inspection checklists. 20. `get_dvi_report` — Retrieve condition grades (Green/Yellow/Red), mm brake/tire readings, and media URLs. 21. `record_dvi_finding` — Log condition severity, millimeter gauge measurements, and technician notes on a DVI item. 22. `send_customer_approval_link` — Dispatch a no-app mobile SMS/email inspection & e-signature portal link. 23. `analyze_obd_dtc` — Analyze OBD-II diagnostic trouble codes (e.g., P0456, P0171) with symptom and test plans. ### Domain 5: Collision Estimating & 11-Rate Supplements (6 Tools) 24. `list_collision_estimates` — Filter collision estimates by carrier, claim number, DRP profile, or supplement status. 25. `get_collision_estimate` — Retrieve baseline E01 lines, S01/S02 supplements, 11-rate totals, and POI zones. 26. `import_ccc_estimate_pdf` — Parse CCC ONE, Mitchell, or Audatex PDF estimates into structured TechLogic lines. 27. `create_estimate_supplement` — Author a versioned collision supplement (S01+) with delta math and teardown notes. 28. `update_collision_rate_profile` — Configure shop or carrier DRP rates across all 11 collision labor/material buckets. 29. `map_point_of_impact` — Record 360-degree Point-of-Impact zones and structural measurement notes on an estimate. ### Domain 6: Parts Inventory & Catalog Valuation (6 Tools) 30. `check_parts_inventory` — Query on-hand stock, reserved quantities, bin locations, unit cost, and retail matrix price. 31. `get_part_sku` — Inspect full SKU history, vendor mappings, reorder threshold, and asset valuation. 32. `adjust_stock_quantity` — Record cycle-count adjustments or shop-supply consumption with inventory GL sync. 33. `list_reorder_alerts` — List SKUs below minimum stock thresholds grouped by preferred supplier. 34. `lookup_motor_labor_spec` — Query MOTOR standard labor hours, torque specs, and OEM service intervals by VIN. 35. `search_oec_oem_catalog` — Search VIN-filtered OEM dealer parts pricing and availability via OEC CollisionLink. ### Domain 7: Vendor Purchasing, POs & Job Costing (6 Tools) 36. `list_vendors` — List configured aftermarket and OEM suppliers (Worldpac, OEC dealers, NAPA, AutoZone) and Net terms. 37. `manage_purchase_order` — Draft, submit, or amend vendor Purchase Orders tied directly to RO or Estimate lines. 38. `receive_po_shipment` — Mark PO lines received, update bin stock, and bind actual wholesale cost to the RO. 39. `record_vendor_bill` — Convert supplier invoices into Accounts Payable bills with Net-30 due dates and GL entries. 40. `create_core_return_memo` — Track remanufactured part core deposits and vendor return credit memos. 41. `get_ro_job_costing` — Compute real-time gross profit dollars and GP% comparing retail billed vs. parts cost + loaded labor. ### Domain 8: Invoicing, Split Payments & Stripe Feeds (6 Tools) 42. `generate_invoice` — Finalize an RO or Collision Estimate into an immutable invoice (supports carrier/deductible splits). 43. `get_invoice` — Retrieve invoice line totals, tax breakdown, payment history, and vector PDF download URL. 44. `record_split_payment` — Apply customer deductible payments and insurance carrier checks against separate AR buckets. 45. `send_stripe_payment_link` — Issue a one-tap SMS/email Stripe checkout link (Apple Pay, Google Pay, Card). 46. `list_ar_aging` — Generate 0-30, 31-60, 61-90, and 90+ day Accounts Receivable aging across carriers and fleets. 47. `reconcile_stripe_payout` — Match settled Stripe bank payouts and processing fees to clearing ledger accounts. ### Domain 9: Double-Entry General Ledger & Multi-Location RBAC (5 Tools) 48. `list_chart_of_accounts` — List asset, liability, equity, revenue, COGS, and operating expense GL accounts. 49. `post_journal_entry` — Record a manual balanced double-entry journal (enforces exact debit == credit invariant). 50. `get_gl_trial_balance` — Compute period trial balance, P&L summary, and balance sheet verification with zero drift. 51. `list_shop_locations` — List rooftops in a Multi-Shop Enterprise organization with tax, currency, and bay metadata. 52. `list_role_permissions` — Inspect RBAC role policies (Owner, Manager, Advisor, Estimator, Parts, Technician, Bookkeeper). --- ## 5. Data Privacy & Security Summary - **Zero AI Model Training**: Tenant operational records and customer PII are never used to train foundation models. - **Tenant-Isolated OCR**: Estimate PDFs and vendor bills are parsed inside ephemeral tenant-scoped workers. - **Transport & Storage**: TLS 1.3 in transit, AES-256 at rest, PCI-DSS Level 1 payment tokenization via Stripe. - **Onboarding**: `/register?mode=mechanical|collision|multi-location&plan=starter|pro|enterprise`