Skip to main content
Glama

list_all_rubrics

Retrieve all rubrics for a Canvas course to view grading criteria and ratings for assignments.

Instructions

List all rubrics in a specific course with optional detailed criteria.

    Args:
        course_identifier: The Canvas course code (e.g., badm_554_120251_246794) or ID
        include_criteria: Whether to include detailed criteria and ratings (default: True)
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_identifierYes
include_criteriaNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function that implements the list_all_rubrics MCP tool. It fetches all rubrics for a given course using Canvas API, optionally includes detailed criteria and ratings, and formats them into a readable summary.
    async def list_all_rubrics(course_identifier: str | int,
                              include_criteria: bool = True) -> str:
        """List all rubrics in a specific course with optional detailed criteria.
    
        Args:
            course_identifier: The Canvas course code (e.g., badm_554_120251_246794) or ID
            include_criteria: Whether to include detailed criteria and ratings (default: True)
        """
        course_id = await get_course_id(course_identifier)
    
        # Fetch all rubrics for the course
        rubrics = await fetch_all_paginated_results(f"/courses/{course_id}/rubrics")
    
        if isinstance(rubrics, dict) and "error" in rubrics:
            return f"Error fetching rubrics: {rubrics['error']}"
    
        if not rubrics:
            course_display = await get_course_code(course_id) or course_identifier
            return f"No rubrics found for course {course_display}."
    
        # Get course display name
        course_display = await get_course_code(course_id) or course_identifier
    
        result = f"All Rubrics for Course {course_display}:\n\n"
    
        for i, rubric in enumerate(rubrics, 1):
            rubric_id = rubric.get("id", "N/A")
            title = rubric.get("title", "Untitled Rubric")
            points_possible = rubric.get("points_possible", 0)
            reusable = rubric.get("reusable", False)
            read_only = rubric.get("read_only", False)
            data = rubric.get("data", [])
    
            result += "=" * 80 + "\n"
            result += f"Rubric #{i}: {title} (ID: {rubric_id})\n"
            result += f"Total Points: {points_possible} | Criteria: {len(data)} | "
            result += f"Reusable: {'Yes' if reusable else 'No'} | "
            result += f"Read-only: {'Yes' if read_only else 'No'}\n"
    
            if include_criteria and data:
                result += "\nCriteria Details:\n"
                result += "-" * 16 + "\n"
    
                for j, criterion in enumerate(data, 1):
                    criterion_id = criterion.get("id", "N/A")
                    description = criterion.get("description", "No description")
                    long_description = criterion.get("long_description", "")
                    points = criterion.get("points", 0)
                    ratings = criterion.get("ratings", [])
    
                    result += f"\n{j}. {description} (ID: {criterion_id}) - {points} points\n"
    
                    if long_description and long_description != description:
                        # Truncate long descriptions to keep output manageable
                        truncated_desc = truncate_text(long_description, 150)
                        result += f"   Description: {truncated_desc}\n"
    
                    if ratings:
                        # Sort ratings by points (highest to lowest)
                        sorted_ratings = sorted(ratings, key=lambda x: x.get("points", 0), reverse=True)
    
                        for rating in sorted_ratings:
                            rating_description = rating.get("description", "No description")
                            rating_points = rating.get("points", 0)
                            rating_id = rating.get("id", "N/A")
    
                            result += f"   - {rating_description} ({rating_points} pts) [ID: {rating_id}]\n"
    
                            # Include long description if it exists and differs
                            rating_long_desc = rating.get("long_description", "")
                            if rating_long_desc and rating_long_desc != rating_description:
                                truncated_rating_desc = truncate_text(rating_long_desc, 100)
                                result += f"     {truncated_rating_desc}\n"
                    else:
                        result += "   No rating scale defined for this criterion.\n"
            elif include_criteria:
                result += "\nNo criteria defined for this rubric.\n"
    
            result += "\n"
    
        # Add summary
        result += "=" * 80 + "\n"
        result += f"Total Rubrics Found: {len(rubrics)}\n"
    
        if include_criteria:
            result += "\nNote: Use the criterion and rating IDs shown above with the grade_with_rubric tool.\n"
            result += "Example: {\"criterion_id\": {\"points\": X, \"comments\": \"...\", \"rating_id\": \"rating_id\"}}\n"
        else:
            result += "\nTo see detailed criteria and ratings, run this command with include_criteria=True.\n"
    
        return result
  • The call to register_rubric_tools(mcp) within register_all_tools, which registers the list_all_rubrics tool among other rubric tools.
    register_rubric_tools(mcp)
  • Import of register_rubric_tools from rubrics.py, enabling its use in server.py for tool registration.
    from .rubrics import register_rubric_tools
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 lists rubrics, implying a read-only operation, but doesn't mention any behavioral traits such as permissions required, rate limits, pagination, error handling, or what happens if the course doesn't exist. For a tool with no annotation coverage, this leaves significant gaps in understanding how it behaves in practice.

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 in the first sentence. The 'Args' section is organized but could be more integrated into the flow. There's no wasted text, and every sentence serves a purpose, though it could be slightly more polished for readability.

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 that there's an output schema (which reduces the need to describe return values), no annotations, and low schema description coverage, the description is moderately complete. It covers the basic purpose and parameters but lacks behavioral details and usage guidelines. For a simple list tool, this might be adequate, but the absence of annotations means more context would be helpful for safe and effective use.

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 explains both parameters: 'course_identifier' as the Canvas course code or ID, and 'include_criteria' as a boolean for detailed criteria. Since the schema description coverage is 0%, this adds meaningful context beyond the bare schema. However, it doesn't provide examples for the 'course_identifier' format beyond a brief mention, and the schema already defines the types and defaults, so the value added is moderate.

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: 'List all rubrics in a specific course with optional detailed criteria.' This specifies the verb ('List'), resource ('rubrics'), and scope ('in a specific course'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'list_assignment_rubrics' or 'get_rubric_details,' which prevents a perfect score.

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 'list_assignment_rubrics' (which might list rubrics for a specific assignment) or 'get_rubric_details' (which might retrieve details for a single rubric), leaving the agent with no context for choosing between them. The only implied usage is for listing rubrics in a course, but this is too vague for effective 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/vishalsachdev/canvas-mcp'

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