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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool returns a table with specific fields (names, IDs, dates, status, and grades), which adds value beyond the input schema. However, it doesn't cover critical behavioral aspects such as whether this is a read-only operation, potential rate limits, authentication needs, or error handling, leaving significant gaps for a tool with no annotation support.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded: the first sentence states the purpose, the second describes the return format, and the third provides parameter guidance. Every sentence earns its place with no wasted words, making it efficient and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one parameter) and the presence of an output schema (which handles return values), the description is mostly complete. It covers purpose, output format, and parameter semantics adequately. However, without annotations, it lacks details on behavioral traits like safety or performance, which slightly reduces completeness for an agent's full understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaningful semantics for the single parameter 'course_id' by explaining it's 'The Gradescope course ID (found via list_courses),' which clarifies its source and context. Since there's only one parameter and schema description coverage is 0%, this compensation is effective, though it doesn't detail format or constraints beyond the schema's basic type.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get all assignments for a specific Gradescope course.' It specifies the verb ('Get') and resource ('assignments'), and distinguishes it from siblings like 'tool_get_assignment_details' by indicating it retrieves all assignments rather than details of a single one. However, it doesn't explicitly contrast with all relevant siblings (e.g., 'tool_get_assignment_submissions'), so it's not a perfect 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides implied usage guidance by mentioning that 'course_id' is 'found via list_courses,' which suggests using 'tool_list_courses' first. It doesn't explicitly state when to use this tool versus alternatives like 'tool_get_assignment_details' or 'tool_get_assignment_submissions,' nor does it provide exclusions or detailed context, so it's adequate but lacks explicit guidelines.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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