Skip to main content
Glama

tool_apply_grade

Apply grades to student submissions by setting rubric items, point adjustments, and comments within the Gradescope grading system.

Instructions

Apply a grade to a student's question submission.

Can apply/remove rubric items, set point adjustments, and add comments.
**WARNING**: This modifies student grades.

Args:
    course_id: The Gradescope course ID.
    question_id: The question ID.
    submission_id: The question submission ID.
    rubric_item_ids: List of rubric item IDs to apply (checked). Items NOT
        in this list will be unchecked. Pass None to keep unchanged.
    point_adjustment: Submission-specific point adjustment. Pass None to keep.
    comment: Grader comment. Pass None to keep unchanged.
    confidence: Agent's self-assessed grading confidence (0.0-1.0).
        Below 0.6 = rejected. 0.6-0.8 = warning. Above 0.8 = OK.
        Pass None to skip confidence gating (manual mode).
    confirm_write: Must be True to save the grade.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_idYes
question_idYes
submission_idYes
rubric_item_idsNo
point_adjustmentNo
commentNo
confidenceNo
confirm_writeNo

Implementation Reference

  • The core implementation of the grading logic that validates confidence levels and interacts with the Gradescope API.
    def apply_grade(
        course_id: str,
        question_id: str,
        submission_id: str,
        rubric_item_ids: list[str] | None = None,
        point_adjustment: float | None = None,
        comment: str | None = None,
        confidence: float | None = None,
        confirm_write: bool = False,
    ) -> str:
  • The wrapper function `tool_apply_grade` exposed to the MCP server that delegates to `apply_grade`.
    def tool_apply_grade(
        course_id: str,
        question_id: str,
        submission_id: str,
        rubric_item_ids: list[str] | None = None,
        point_adjustment: float | None = None,
        comment: str | None = None,
        confidence: float | None = None,
        confirm_write: bool = False,
    ) -> str:
        """Apply a grade to a student's question submission.
    
        Can apply/remove rubric items, set point adjustments, and add comments.
        **WARNING**: This modifies student grades.
    
        Args:
            course_id: The Gradescope course ID.
            question_id: The question ID.
            submission_id: The question submission ID.
            rubric_item_ids: List of rubric item IDs to apply (checked). Items NOT
                in this list will be unchecked. Pass None to keep unchanged.
            point_adjustment: Submission-specific point adjustment. Pass None to keep.
            comment: Grader comment. Pass None to keep unchanged.
            confidence: Agent's self-assessed grading confidence (0.0-1.0).
                Below 0.6 = rejected. 0.6-0.8 = warning. Above 0.8 = OK.
                Pass None to skip confidence gating (manual mode).
            confirm_write: Must be True to save the grade.
        """
        return apply_grade(
            course_id,
            question_id,
            submission_id,
            rubric_item_ids,
            point_adjustment,
            comment,
            confidence,
            confirm_write,
        )

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