Skip to main content
Glama

tool_get_assignment_details

Retrieve assignment details including name, dates, submission status, and grade from Gradescope courses for tracking academic progress.

Instructions

Get detailed information about a specific assignment.

Returns the assignment name, dates, submission status, and grade.

Args:
    course_id: The Gradescope course ID.
    assignment_id: The assignment ID (found via get_assignments).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_idYes
assignment_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool registration for "tool_get_assignment_details".
    def tool_get_assignment_details(course_id: str, assignment_id: str) -> str:
        """Get detailed information about a specific assignment.
    
        Returns the assignment name, dates, submission status, and grade.
    
        Args:
            course_id: The Gradescope course ID.
            assignment_id: The assignment ID (found via get_assignments).
        """
        return get_assignment_details(course_id, assignment_id)
  • The actual implementation of the get_assignment_details logic.
    def get_assignment_details(course_id: str, assignment_id: str) -> str:
        """Get detailed information about a specific assignment.
    
        Args:
            course_id: The Gradescope course ID.
            assignment_id: The assignment ID.
        """
        if not course_id or not assignment_id:
            return "Error: both course_id and assignment_id are 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 assignment details: {e}"
    
        # Find the specific assignment
        target = None
        for a in assignments:
            if str(a.assignment_id) == str(assignment_id):
                target = a
                break
    
        if target is None:
            return f"Assignment `{assignment_id}` not found in course `{course_id}`."
    
        lines = [
            f"## Assignment Details\n",
            f"- **Name:** {target.name}",
            f"- **Assignment ID:** `{target.assignment_id}`",
            f"- **Release Date:** {_format_datetime(target.release_date)}",
            f"- **Due Date:** {_format_datetime(target.due_date)}",
            f"- **Late Due Date:** {_format_datetime(target.late_due_date)}",
            f"- **Submission Status:** {target.submissions_status or 'N/A'}",
            f"- **Grade:** {target.grade or 'N/A'} / {target.max_grade or 'N/A'}",
        ]
    
        return "\n".join(lines)
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. It discloses that the tool returns specific details (name, dates, status, grade), which adds some behavioral context. However, it lacks information on permissions required, rate limits, error handling, or whether it's a read-only operation (implied by 'Get' but not explicit). For a tool with no annotations, this is a significant gap in transparency.

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

Conciseness4/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, followed by return details and parameter explanations. Every sentence adds value, with no redundant information. However, the structure could be slightly improved by more clearly separating usage guidance from parameter semantics.

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

Completeness3/5

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

Given the tool has an output schema (which likely defines return values), the description doesn't need to explain returns in detail. However, with no annotations and 0% schema coverage for inputs, the description partially compensates with parameter context but lacks behavioral details like auth needs or error cases. For a simple read operation, it's adequate but has clear gaps in completeness.

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?

Schema description coverage is 0%, so the description must compensate. It adds meaning by explaining that 'course_id' is a 'Gradescope course ID' and 'assignment_id' is 'found via get_assignments', providing context beyond the schema's generic titles. This clarifies the source and usage of parameters, though it doesn't detail formats or constraints.

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 detailed information about a specific assignment.' It specifies the verb ('Get') and resource ('assignment'), and lists the returned details (name, dates, status, grade). However, it doesn't explicitly differentiate from siblings like 'tool_get_assignments' (which lists assignments) or 'tool_get_assignment_statistics' (which might provide aggregated data), though the focus on 'detailed information' for a 'specific' assignment implies some distinction.

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 implies usage by stating it returns details for a 'specific assignment' and references 'tool_get_assignments' to find the assignment_id, suggesting a workflow. However, it doesn't explicitly state when to use this tool versus alternatives like 'tool_get_assignment_submissions' or 'tool_get_assignment_outline', nor does it provide exclusions or prerequisites beyond needing IDs.

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