Skip to main content
Glama

Canvas MCP Server

delete_announcements_by_criteria

Remove Canvas course announcements based on specific criteria such as title content, posting date ranges, or regular expression patterns to manage announcement content efficiently.

Instructions

Delete announcements matching specific criteria. Args: course_identifier: The Canvas course code or ID criteria: Dict with search criteria: - "title_contains": str - Delete if title contains this text - "older_than": str - Delete if posted before this date (ISO format) - "newer_than": str - Delete if posted after this date (ISO format) - "title_regex": str - Delete if title matches regex pattern limit: Maximum number of announcements to delete (safety limit) dry_run: If True, show what would be deleted without actually deleting Returns: String with operation results showing matched and deleted announcements Example usage: # Delete all announcements older than 30 days from datetime import datetime, timedelta results = delete_announcements_by_criteria( "60366", criteria={ "older_than": (datetime.now() - timedelta(days=30)).isoformat(), "title_contains": "reminder" }, limit=10, dry_run=False )

Input Schema

NameRequiredDescriptionDefault
course_identifierYes
criteriaYes
dry_runNo
limitNo

Input Schema (JSON Schema)

{ "properties": { "course_identifier": { "anyOf": [ { "type": "string" }, { "type": "integer" } ], "title": "Course Identifier" }, "criteria": { "additionalProperties": true, "title": "Criteria", "type": "object" }, "dry_run": { "default": true, "title": "Dry Run", "type": "boolean" }, "limit": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Limit" } }, "required": [ "course_identifier", "criteria" ], "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vishalsachdev/canvas-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server