Skip to main content
Glama

tool_create_rubric_item

Add a scoring criterion to a question's rubric in Gradescope. Specify point value based on scoring type (positive adds points, negative deducts).

Instructions

Create a new rubric item for a question.

**WARNING**: Changes the rubric for ALL submissions.

Weight semantics depend on the question's scoring type:
- **Positive scoring:** Items ADD points (use positive weights).
- **Negative scoring:** Items DEDUCT from max (use negative weights).

Args:
    course_id: The Gradescope course ID.
    question_id: The question ID.
    description: Rubric item description.
    weight: Point value — see scoring-type note above.
    confirm_write: Must be True to create the rubric item.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_idYes
question_idYes
descriptionYes
weightYes
confirm_writeNo

Implementation Reference

  • The actual implementation of the rubric creation logic.
    def create_rubric_item(
        course_id: str,
        question_id: str,
        description: str,
        weight: float,
        confirm_write: bool = False,
    ) -> str:
        """Create a new rubric item for a question.
    
        **WARNING**: This modifies the rubric. Changes apply to ALL submissions.
    
        Weight semantics depend on the question's scoring type:
        - **Positive scoring:** Items ADD points. Use positive weights (e.g., 5.0
          for ``Correct answer``). The total score is the sum of applied items.
        - **Negative scoring:** Items DEDUCT points from the max. Use negative
          weights (e.g., -2.0 for ``Missing units``).
    
        Check the scoring type with ``get_question_rubric`` or
        ``get_submission_grading_context`` before creating items.
    
        Args:
            course_id: The Gradescope course ID.
            question_id: The question ID.
            description: Description of the rubric item (e.g., "Correct answer").
  • The MCP tool registration and handler wrapper for creating a rubric item.
    def tool_create_rubric_item(
        course_id: str,
        question_id: str,
        description: str,
        weight: float,
        confirm_write: bool = False,
    ) -> str:
        """Create a new rubric item for a question.
    
        **WARNING**: Changes the rubric for ALL submissions.
    
        Weight semantics depend on the question's scoring type:
        - **Positive scoring:** Items ADD points (use positive weights).
        - **Negative scoring:** Items DEDUCT from max (use negative weights).
    
        Args:
            course_id: The Gradescope course ID.
            question_id: The question ID.
            description: Rubric item description.
            weight: Point value — see scoring-type note above.
            confirm_write: Must be True to create the rubric item.
        """
        return create_rubric_item(
            course_id, question_id, description, weight, 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