Skip to main content
Glama

get_my_peer_reviews_todo

Retrieve pending peer reviews assigned to you in Canvas courses, optionally filtered by specific course, to help you complete required evaluations.

Instructions

Get peer reviews you need to complete.

    Args:
        course_identifier: Optional course code or ID to filter by specific course

    Returns list of peer reviews assigned to you that need completion.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_identifierNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Main handler function implementing get_my_peer_reviews_todo tool. Fetches pending peer reviews by querying courses, assignments, and peer_reviews API endpoints, formats output listing incomplete reviews with course and student info.
    @mcp.tool()
    @validate_params
    async def get_my_peer_reviews_todo(course_identifier: str | int | None = None) -> str:
        """Get peer reviews you need to complete.
    
        Args:
            course_identifier: Optional course code or ID to filter by specific course
    
        Returns list of peer reviews assigned to you that need completion.
        """
        if course_identifier:
            course_ids = [await get_course_id(course_identifier)]
        else:
            # Get all active courses
            courses = await fetch_all_paginated_results(
                "/courses",
                params={"enrollment_state": "active", "per_page": 100}
            )
            if isinstance(courses, dict) and "error" in courses:
                return f"Error fetching courses: {courses['error']}"
    
            course_ids = [course.get("id") for course in courses if course.get("id")]
    
        all_peer_reviews = []
    
        for course_id in course_ids:
            # Get assignments for this course
            assignments = await fetch_all_paginated_results(
                f"/courses/{course_id}/assignments",
                params={"per_page": 100}
            )
    
            if isinstance(assignments, dict) and "error" in assignments:
                continue
    
            # Check each assignment for peer reviews
            for assignment in assignments if isinstance(assignments, list) else []:
                if assignment.get("peer_reviews"):
                    assignment_id = assignment.get("id")
    
                    # Get peer reviews for this assignment
                    peer_reviews = await fetch_all_paginated_results(
                        f"/courses/{course_id}/assignments/{assignment_id}/peer_reviews",
                        params={"include[]": ["user"], "per_page": 100}
                    )
    
                    if isinstance(peer_reviews, list):
                        # Filter to reviews assigned to current user that are incomplete
                        for review in peer_reviews:
                            # Note: We'd need to filter by current user ID
                            # For now, show all incomplete reviews
                            if review.get("workflow_state") != "completed":
                                review["_course_id"] = course_id
                                review["_assignment_name"] = assignment.get("name")
                                all_peer_reviews.append(review)
    
        if not all_peer_reviews:
            return "You have no pending peer reviews! ✅"
    
        output_lines = ["Peer Reviews You Need to Complete:\n"]
    
        for review in all_peer_reviews:
            assignment_name = review.get("_assignment_name", "Unknown Assignment")
            course_id = review.get("_course_id")
            course_display = await get_course_code(course_id) if course_id else "Unknown Course"
    
            user_id = review.get("user_id")
            assessor_id = review.get("assessor_id")
    
            output_lines.append(
                f"• {assignment_name}\n"
                f"  Course: {course_display}\n"
                f"  Reviewing: Student {user_id}\n"
                f"  Status: Incomplete\n"
            )
    
        return "\n".join(output_lines)
  • Calls register_student_tools(mcp) within register_all_tools, which registers the student tools including get_my_peer_reviews_todo.
    register_student_tools(mcp)
  • The @mcp.tool() decorator registers the function as an MCP tool within the register_student_tools function.
    @mcp.tool()
    @validate_params
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 states the tool returns a list of peer reviews needing completion, but doesn't describe authentication requirements, rate limits, pagination, error handling, or what 'completion' entails (e.g., pending vs. overdue). For a tool with no annotations, this leaves significant behavioral gaps.

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, with the core purpose stated first. The Args and Returns sections are structured clearly, though the formatting uses markdown-like indentation that might be redundant. Every sentence adds value, with no unnecessary fluff.

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

Completeness3/5

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

Given the tool's moderate complexity (one optional parameter) and the presence of an output schema (which handles return values), the description is minimally adequate. However, with no annotations and incomplete behavioral details, it doesn't fully cover aspects like authentication or error handling. It meets basic needs but has clear gaps for a tool in a peer review context.

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

Parameters4/5

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

The description adds meaningful context for the single parameter: 'Optional course code or ID to filter by specific course.' This clarifies the parameter's purpose beyond the schema's title ('Course Identifier'), which has 0% description coverage. Since there's only one parameter and the description explains its optional nature and filtering role, it compensates well for the schema gap.

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 peer reviews you need to complete.' It specifies the verb ('Get') and resource ('peer reviews assigned to you that need completion'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_my_todo_items' or 'get_peer_review_assignments', which might have overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_my_todo_items' (which might include peer reviews) or 'get_peer_review_assignments' (which could list all assignments, not just those needing completion). There's no context on prerequisites, exclusions, or specific scenarios for use.

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/vishalsachdev/canvas-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server