delete_announcement_with_confirmation
Remove announcements from Canvas courses with safety checks, including optional title matching verification and dry-run testing to prevent accidental deletions.
Instructions
Delete an announcement with optional safety checks.
Args:
course_identifier: The Canvas course code or ID
announcement_id: The announcement ID to delete
require_title_match: If provided, only delete if the announcement title matches exactly
dry_run: If True, verify but don't actually delete (for testing)
Returns:
String with operation result including status and title match information
Raises:
ValueError: If require_title_match is provided and doesn't match the actual title
Example usage:
# Delete only if title matches exactly (safety check)
result = delete_announcement_with_confirmation(
"60366",
"925355",
require_title_match="Preparing for the week",
dry_run=False
)
Input Schema
Name | Required | Description | Default |
---|---|---|---|
announcement_id | Yes | ||
course_identifier | Yes | ||
dry_run | No | ||
require_title_match | No |
Input Schema (JSON Schema)
{
"properties": {
"announcement_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"title": "Announcement Id"
},
"course_identifier": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"title": "Course Identifier"
},
"dry_run": {
"default": false,
"title": "Dry Run",
"type": "boolean"
},
"require_title_match": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Require Title Match"
}
},
"required": [
"course_identifier",
"announcement_id"
],
"type": "object"
}