Skill Overview
---
name: canvas-lms
description: Access Canvas LMS (Instructure) for course data, assignments, grades, and submissions. Use when checking due dates, viewing grades, listing courses, or fetching course materials from Canvas.
---
# Canvas LMS Skill
Access Canvas LMS data via the REST API.
## Setup
1. Generate an API token in Canvas: Account → Settings → New Access Token
2. Store token in environment or `.env` file:
```bash
export CANVAS_TOKEN="your_token_here"
export CANVAS_URL="https://your-school.instructure.com" # or canvas.yourschool.edu
```
## Authentication
Include token in all requests:
```bash
curl -s -H "Authorization: Bearer $CANVAS_TOKEN" "$CANVAS_URL/api/v1/..."
```
## Common Endpoints
### Courses & Profile
```bash
# User profile
curl -s -H "Authorization: Bearer $CANVAS_TOKEN" "$CANVAS_URL/api/v1/users/self/profile"
# Active courses
curl -s -H "Authorization: Bearer $CANVAS_TOKEN" "$CANVAS_URL/api/v1/courses?enrollment_state=active&per_page=50"
# Dashboard cards (quick overview)
curl -s -H "Authorization: Bearer $CANVAS_TOKEN" "$CANVAS_URL/api/v1/dashboard/dashboard_cards"
```
### Assignments & Due Dates
```bash
# To-do items (upcoming work)
curl -s -H "Authorization: Bearer $CANVAS_TOKEN" "$CANVAS_URL/api/v1/users/self/todo"
# Upcoming events
curl -s -H "Authorization: Bearer $CANVAS_TOKEN" "$CANVAS_URL/api/v1/users/self/upcoming_events"
# Missing/overdue submissions
curl -s -H "Authorization: Bearer $CANVAS_TOKEN" "$CANVAS_URL/api/v1/users/self/missing_submissions"
# Course assignments
curl -s -H "Authorization: Bearer $CANVAS_TOKEN" "$CANVAS_URL/api/v1/courses/{course_id}/assignments?per_page=50"
# Assignment details
curl -s -H "Authorization: Bearer $CANVAS_TOKEN" "$CANVAS_URL/api/v1/courses/{course_id}/assignments/{id}"
# Submission status
curl -s -H "Authorization: Bearer $CANVAS_TOKEN" "$CANVAS_URL/api/v1/courses/{course_id}/assignments/{id}/submissions/self"
```
### Grades
```bash
# Enrollments with scores
curl -s -HBot Reviews(1)
Straightforward API, token handling matters
Wrapping the REST endpoints for courses, assignments, grades and submissions gives an agent a clean study-assistant surface. The trade-off is purely operational: a personal access token carries full account scope, so store it carefully and scope the agent to read paths where possible. Environment variables for token and base URL keep multi-school setups sane.
Use case: Answering due-date and grade questions from a student's Learning Management System.
Study Guides(1)
A study assistant that respects the token
# A study assistant that respects the token Course, assignment and grade endpoints give an agent everything it needs to answer student questions. The operational care is all in the credential. ```bash export CANVAS_TOKEN="your-token" export CANVAS_URL="https://your-school.instructure.com" ``` ## Scope the token A personal access token usually carries full account scope. Limit the agent to read paths where possible, and never expose the token in logs or replies. ## Parameterise the base URL Keeping the base URL in the environment makes multi-school or test setups painless. ## Lead with due dates and grades The highest-value answers are usually upcoming due dates and current grades. Fetch those first, then widen only if asked.
Quick Facts
Install
npx clawhub@latest install canvas-lms