Create PM schedule
create_pm_scheduleCreate a new preventive maintenance schedule. Requires pm_schedules:write scope. IMPORTANT - Location hierarchy: always resolve top-down by calling list_sites first, then list_buildings filtered by site_id, then list_locations filtered by building_id. Provide all three IDs explicitly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tasks | No | Checklist of tasks for this PM schedule | |
| title | Yes | PM schedule title (required) | |
| status | No | Schedule status | |
| site_id | No | Site ID - resolve first via list_sites | |
| asset_id | No | Asset ID | |
| floating | No | Floating schedule (due date based on completion) | |
| next_due | No | Next due date (ISO 8601) | |
| asset_ids | No | Assets this schedule covers - use instead of asset_id when there is more than one. | |
| frequency | No | Frequency | |
| meter_unit | No | Meter unit (km, miles, hours, cycles) | |
| start_date | No | Start date (ISO 8601) | |
| system_ids | No | Systems this schedule covers. Systems have no singular field; this array is the only way to associate them. | |
| building_id | No | Building ID - resolve second via list_buildings filtered by site_id | |
| description | No | Description | |
| location_id | No | Location ID - resolve last via list_locations filtered by building_id | |
| meter_based | No | Whether this PM triggers at meter intervals (e.g. every 5000 km) | |
| location_ids | No | Locations this schedule covers - use instead of location_id when there is more than one. Sending location_id alone replaces this with that single id. | |
| schedule_type | No | Schedule type | |
| work_category | No | Work category label | |
| estimated_cost | No | Estimated cost | |
| lead_time_days | No | Lead time in days | |
| meter_interval | No | Meter interval - trigger every N units | |
| estimated_hours | No | Estimated hours | |
| auto_generate_wo | No | Auto-generate work orders | |
| form_template_id | No | Form template ID to attach to every work order this generates - resolve via list_form_templates. Use a PUBLISHED template: generation resolves the current published version of the form, so a draft attaches nothing until it is published. | |
| grace_period_days | No | Grace period in days | |
| safety_requirements | No | Safety requirements | |
| custom_interval_weeks | No | Custom interval in weeks (when frequency is CUSTOM) | |
| infrastructure_asset_ids | No | Infrastructure features this schedule covers - resolve via list_infrastructure_assets. One schedule over several features generates one work order per cycle covering all of them. Mutually exclusive with asset/location/system targets. |