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
| Name | Required | Description | Default |
|---|---|---|---|
| course_id | Yes | ||
| question_id | Yes | ||
| description | Yes | ||
| weight | Yes | ||
| confirm_write | No |
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"). - src/gradescope_mcp/server.py:456-480 (registration)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 )