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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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,
        )
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing: 1) the destructive nature ('This modifies student grades'), 2) the confidence gating behavior with specific thresholds, 3) the manual mode option, and 4) the safety mechanism (confirm_write). It doesn't mention rate limits or authentication requirements, but covers key behavioral aspects.

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 efficiently structured: purpose statement first, capabilities listed, warning highlighted, then detailed parameter explanations. Every sentence earns its place, with no redundant information. The bullet-like parameter explanations are clear without being verbose.

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

Completeness5/5

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

Given the tool's complexity (8 parameters, destructive operation, no annotations) and the presence of an output schema, the description is complete. It covers purpose, behavioral warnings, parameter semantics, and usage context. The output schema existence means return values don't need explanation in the description.

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

Parameters5/5

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

With 0% schema description coverage, the description fully compensates by explaining all 8 parameters. It clarifies: rubric_item_ids behavior (items not in list become unchecked), point_adjustment/comment/confidence None semantics (keep unchanged/skip), confidence thresholds with specific ranges, and confirm_write's safety role. This adds substantial meaning beyond the bare schema.

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

Purpose5/5

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

The description clearly states the specific action ('Apply a grade') and target resource ('student's question submission'), distinguishing it from sibling tools like tool_create_rubric_item or tool_update_rubric_item. It also lists specific capabilities: applying/removing rubric items, setting point adjustments, and adding comments.

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 through the warning about modifying student grades and the confirm_write parameter, but doesn't explicitly state when to use this tool versus alternatives like tool_grade_answer_group or tool_update_rubric_item. It provides some context about confidence gating but lacks explicit guidance on tool selection.

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