Skip to main content
Glama

tool_get_assignment_graders

Retrieve the list of graders assigned to a specific question for instructors and TAs to manage grading responsibilities.

Instructions

Get the list of graders assigned to a specific question (instructor/TA only).

Args:
    course_id: The Gradescope course ID.
    question_id: The question ID within the assignment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_idYes
question_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Implementation of tool_get_assignment_graders, which fetches and filters the list of graders assigned to a specific Gradescope question.
    def get_assignment_graders(course_id: str, question_id: str) -> str:
        """Get the list of graders for a specific question (instructor/TA only).
    
        Args:
            course_id: The Gradescope course ID.
            question_id: The question ID within the assignment.
        """
        if not course_id or not question_id:
            return "Error: both course_id and question_id are required."
    
        try:
            conn = get_connection()
            graders = conn.account.get_assignment_graders(course_id, question_id)
        except AuthError as e:
            return f"Authentication error: {e}"
        except Exception as e:
            return f"Error fetching graders: {e}"
    
        if not graders:
            return f"No graders found for question `{question_id}` in course `{course_id}`."
    
        # Filter: some question types return raw user IDs or internal labels
        _DIRTY_GRADER_PATTERNS = {"(needs labeling)", "(none)", "(unassigned)"}
        named_graders = [
            g for g in graders
            if not str(g).isdigit()
            and str(g).lower().strip() not in _DIRTY_GRADER_PATTERNS
        ]
        id_only = [g for g in graders if str(g).isdigit()]
        dirty_labels = [
            g for g in graders
            if str(g).lower().strip() in _DIRTY_GRADER_PATTERNS
        ]
    
        lines = [
            f"## Graders for Question {question_id}\n",
            f"**Total graders:** {len(named_graders)}\n",
        ]
        for grader in sorted(named_graders):
            lines.append(f"- {grader}")
    
        if id_only or dirty_labels:
            extras_count = len(id_only) + len(dirty_labels)
            lines.append(
                f"\n⚠️ **Note:** {extras_count} system/auto-grader "
                f"{'entry was' if extras_count == 1 else 'entries were'} "
                "filtered from the list."
            )
    
        return "\n".join(lines)
  • Registration of tool_get_assignment_graders in the MCP server.
    def tool_get_assignment_graders(
        course_id: str, question_id: str
    ) -> str:
        """Get the list of graders assigned to a specific question (instructor/TA only).
    
        Args:
            course_id: The Gradescope course ID.
            question_id: The question ID within the assignment.
        """
        return get_assignment_graders(course_id, question_id)
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 of behavioral disclosure. It mentions access control ('instructor/TA only'), which is useful, but does not disclose other traits such as whether this is a read-only operation, potential rate limits, error conditions, or what the output looks like (though an output schema exists). For a tool with no annotations, this leaves significant gaps in understanding its behavior beyond basic purpose.

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 and access restriction, followed by a structured 'Args' section. There is no wasted text, and it efficiently conveys key information in two parts. However, it could be slightly more polished by integrating the args into the flow, but it remains clear and concise.

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

Completeness4/5

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

Given the tool has 2 parameters, no annotations, but an output schema exists, the description is reasonably complete. It covers the purpose, access control, and parameters, and the output schema will handle return values. However, it lacks details on behavioral aspects like error handling or usage nuances, which could be important for a tool with no annotations. Overall, it's adequate but not fully comprehensive.

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

Parameters3/5

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

The description includes an 'Args' section that lists and briefly describes the two parameters ('course_id' and 'question_id'), adding meaning beyond the input schema, which has 0% description coverage. However, it does not provide detailed semantics like format examples or constraints (e.g., what a valid ID looks like). With low schema coverage, the description compensates partially but not fully, aligning with the baseline expectation.

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 the list of graders assigned to a specific question' with the qualification '(instructor/TA only)'. It specifies the verb ('Get'), resource ('list of graders'), and scope ('assigned to a specific question'). However, it does not explicitly differentiate from sibling tools like 'tool_get_course_roster' or 'tool_get_assignment_details', which might also involve retrieving course-related data, so it lacks sibling differentiation.

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 specifying '(instructor/TA only)', indicating it's for authorized users only, but it does not provide explicit guidance on when to use this tool versus alternatives. For example, it doesn't clarify if this is for grading management versus other grader-related tools (though none are listed as siblings). The context is clear but lacks exclusions or named alternatives.

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