update_scan_schedule
Update a scan schedule's attributes: name, frequency, targets, tags, or throttling. Only provided fields are changed, leaving others unchanged.
Instructions
Update an existing scan schedule. Only the provided fields are changed.
Args:
schedule_id: The ID of the scan schedule to update
name: Rename the schedule
first_scan_time: ISO 8601 timestamp, in the future and on the hour
scan_frequency: One of 'daily', 'weekly', 'monthly', 'quarterly'
target_ids: Replace the set of target IDs included in the schedule
tag_names: Replace the set of target tag names included in the schedule
throttled: Whether to throttle the scan
web_ports_only: Only scan standard web ports
upload_to_drata: Upload scan results to Drata
upload_to_vanta: Upload scan results to Vanta
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schedule_id | Yes | ||
| name | No | ||
| first_scan_time | No | ||
| scan_frequency | No | ||
| target_ids | No | ||
| tag_names | No | ||
| throttled | No | ||
| web_ports_only | No | ||
| upload_to_drata | No | ||
| upload_to_vanta | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- intruder_mcp/server.py:384-425 (handler)The MCP tool handler for update_scan_schedule. It's an async function decorated with @mcp.tool(). It accepts optional parameters to update a scan schedule, parses the ISO 8601 timestamp, calls api.update_scan_schedule(), and formats the result.
@mcp.tool() async def update_scan_schedule( schedule_id: int, name: Optional[str] = None, first_scan_time: Optional[str] = None, scan_frequency: Optional[ScanFrequencyEnum] = None, target_ids: Optional[List[int]] = None, tag_names: Optional[List[str]] = None, throttled: Optional[bool] = None, web_ports_only: Optional[bool] = None, upload_to_drata: Optional[bool] = None, upload_to_vanta: Optional[bool] = None, ) -> str: """ Update an existing scan schedule. Only the provided fields are changed. Args: schedule_id: The ID of the scan schedule to update name: Rename the schedule first_scan_time: ISO 8601 timestamp, in the future and on the hour scan_frequency: One of 'daily', 'weekly', 'monthly', 'quarterly' target_ids: Replace the set of target IDs included in the schedule tag_names: Replace the set of target tag names included in the schedule throttled: Whether to throttle the scan web_ports_only: Only scan standard web ports upload_to_drata: Upload scan results to Drata upload_to_vanta: Upload scan results to Vanta """ parsed_first_scan_time = _parse_iso8601(first_scan_time) if first_scan_time is not None else None result = api.update_scan_schedule( schedule_id=schedule_id, name=name, first_scan_time=parsed_first_scan_time, scan_frequency=scan_frequency, tags=tag_names, targets=target_ids, throttled=throttled, web_ports_only=web_ports_only, upload_to_drata=upload_to_drata, upload_to_vanta=upload_to_vanta, ) return _format_schedule_result("Updated", schedule_id, result) - intruder_mcp/api_client.py:308-320 (helper)The API client method that sends a PATCH request to /scans/schedules/{schedule_id}/ using PatchedAssessmentScheduleCreateUpdateRequest for serialization.
def update_scan_schedule(self, schedule_id: int, name: Optional[str] = None, first_scan_time: Optional[datetime] = None, scan_frequency: Optional[ScanFrequencyEnum] = None, tags: Optional[List[str]] = None, targets: Optional[List[int]] = None, throttled: Optional[bool] = None, web_ports_only: Optional[bool] = None, upload_to_drata: Optional[bool] = None, upload_to_vanta: Optional[bool] = None) -> dict: data = PatchedAssessmentScheduleCreateUpdateRequest( name=name, first_scan_time=first_scan_time, scan_frequency=scan_frequency, tags=tags, targets=targets, throttled=throttled, web_ports_only=web_ports_only, upload_to_drata=upload_to_drata, upload_to_vanta=upload_to_vanta, ) return self.client.patch(f"{self.base_url}/scans/schedules/{schedule_id}/", json=data.model_dump(mode="json", exclude_none=True)).json() - intruder_mcp/enums.py:307-316 (schema)PatchedAssessmentScheduleCreateUpdateRequest Pydantic model (all fields Optional) used for partial updates to a scan schedule.
class PatchedAssessmentScheduleCreateUpdateRequest(BaseModel): name: Optional[str] = Field(None, min_length=1) first_scan_time: Optional[datetime] = None scan_frequency: Optional[ScanFrequencyEnum] = None tags: Optional[List[str]] = None targets: Optional[List[int]] = None throttled: Optional[bool] = None web_ports_only: Optional[bool] = None upload_to_drata: Optional[bool] = None upload_to_vanta: Optional[bool] = None - intruder_mcp/enums.py:37-41 (schema)ScanFrequencyEnum enum with values: monthly, daily, weekly, quarterly.
class ScanFrequencyEnum(str, Enum): MONTHLY = "monthly" DAILY = "daily" WEEKLY = "weekly" QUARTERLY = "quarterly" - intruder_mcp/server.py:384-384 (registration)The @mcp.tool() decorator on the update_scan_schedule function registers it as an MCP tool.
@mcp.tool()