tool_get_assignments
Retrieve all assignments for a Gradescope course, including names, IDs, dates, status, and grades to manage coursework.
Instructions
Get all assignments for a specific Gradescope course.
Returns a table of assignments with names, IDs, dates, status, and grades.
Args:
course_id: The Gradescope course ID (found via list_courses).Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| course_id | Yes |
Implementation Reference
- The actual implementation of get_assignments which performs the work of fetching the assignments.
def get_assignments(course_id: str) -> str: """Get all assignments for a specific course. Args: course_id: The Gradescope course ID. """ if not course_id: return "Error: course_id is required." try: conn = get_connection() assignments = conn.account.get_assignments(course_id) except AuthError as e: return f"Authentication error: {e}" except Exception as e: return f"Error fetching assignments: {e}" if not assignments: return f"No assignments found for course `{course_id}`." lines = [f"## Assignments for Course {course_id}\n"] lines.append("| # | Name | ID | Release Date | Due Date | Late Due | Status | Grade |") lines.append("|---|------|-----|-------------|----------|----------|--------|-------|") for i, a in enumerate(assignments, 1): - src/gradescope_mcp/server.py:78-87 (registration)The tool registration for tool_get_assignments which wraps the get_assignments helper.
@mcp.tool() def tool_get_assignments(course_id: str) -> str: """Get all assignments for a specific Gradescope course. Returns a table of assignments with names, IDs, dates, status, and grades. Args: course_id: The Gradescope course ID (found via list_courses). """ return get_assignments(course_id)