Skip to main content
Glama

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
NameRequiredDescriptionDefault
course_idYes

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):
  • 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)

Latest Blog Posts

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/Yuanpeng-Li/gradescope-mcp'

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