Skip to main content
Glama

list_assignments

List assignments for a Canvas course with due dates, points, and submission status. Optionally include student submissions.

Instructions

List assignments in a course. Includes due_at, points, submission status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_idYes
include_submissionsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The 'list_assignments' tool handler function. Decorated with @mcp.tool(), it takes a course_id and optional include_submissions flag, fetches assignments from the Canvas API, and returns a list of dicts with id, name, due_at, points_possible, html_url, submission_types, and optionally submission details.
    @mcp.tool()
    def list_assignments(course_id: int, include_submissions: bool = False) -> list[dict]:
        """List assignments in a course. Includes due_at, points, submission status."""
        params = {}
        if include_submissions:
            params["include[]"] = "submission"
        asg = _get(f"/api/v1/courses/{course_id}/assignments", **params)
        out = []
        for a in asg:
            item = {
                "id": a["id"],
                "name": a.get("name"),
                "due_at": a.get("due_at"),
                "points_possible": a.get("points_possible"),
                "html_url": a.get("html_url"),
                "submission_types": a.get("submission_types"),
            }
            if include_submissions and a.get("submission"):
                s = a["submission"]
                item["submission"] = {"score": s.get("score"), "submitted_at": s.get("submitted_at"), "workflow_state": s.get("workflow_state")}
            out.append(item)
        return out
  • The @mcp.tool() decorator on line 51 (and similarly on line 59) is how FastMCP registers the function as a tool. The decorator at line 59 registers 'list_assignments'.
    @mcp.tool()
Behavior3/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. The term 'list' implies a read-only operation, but the description does not explicitly confirm safety, state auth requirements, or describe any side effects. It is adequate but lacks depth.

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 a single sentence that conveys the core purpose efficiently. However, it could be slightly expanded to improve clarity without harming conciseness.

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 presence of an output schema and only two parameters, the description is minimally complete. However, it omits explanation of the key 'include_submissions' parameter, which reduces completeness. It suffices for a simple list operation but leaves gaps.

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

Parameters1/5

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

Schema description coverage is 0%, yet the description adds no meaning to the parameters. 'include_submissions' is not explained, and the description fails to clarify how it affects results. This is a significant gap for a tool with only two parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists assignments in a course and specifies the included fields (due_at, points, submission status). It uses a specific verb+resource pattern, distinguishing it from sibling tools like list_courses or list_announcements.

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?

No explicit guidance on when to use this tool versus alternatives. There is no mention of exclusion criteria or references to sibling tools. The description only implies usage for listing assignments without context.

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

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