--- id: "47e59e97-c394-49c2-a9a1-82c29b312bfc" name: "canvas_get_assignments()" micro_summary: "Call when you need to extract all visible planner items from the Canvas dashboard." status: "resolved" see_also: [] scope: "Extract all visible planner items from the Canvas dashboard. Iterates .planner-day → .planner-grouping → .planner-item, stripping \"Assignment \" prefix and extracting due dates, points, and completion status." --- ## canvas_get_assignments() Extract all visible planner items from Canvas dashboard. ```python result = canvas_get_assignments() # Returns list of dicts: # { day_label, date, course, course_url, name, due, url, type, completed, points } ``` Requires being on the Canvas dashboard (`/`). Returns `{error: "no planner found. navigate to canvas dashboard first"}` if `#dashboard-planner` not found. ### Extracted fields | Field | Source | |-------|--------| | day_label | `h2 > div[data-testid="today-text"]` | | date | `h2 > div[data-testid="today-date"]` | | course | `.Grouping-styles__title` text | | course_url | `.Grouping-styles__hero` href | | name | `a[data-cid="Link"]` span text, minus "Assignment " prefix | | due | After ", due " in link text | | url | `a[data-cid="Link"]` href | | type | Last word of `.PlannerItem-styles__type` (Assignment, Discussion, etc.) | | completed | `input[data-testid="planner-item-completed-checkbox"]` checked | | points | `.PlannerItem-styles__score` text (e.g., "100 pts") |