Skip to main content
Glama

upcoming_events

Retrieve upcoming assignments and calendar events from all Canvas courses, covering roughly the next two weeks.

Instructions

Upcoming planner items (assignments, calendar events) across all courses. Canvas returns roughly the next two weeks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Tool handler for 'upcoming_events' - calls Canvas API /api/v1/users/self/upcoming_events to fetch upcoming planner items.
    @mcp.tool()
    def upcoming_events() -> list[dict]:
        """Upcoming planner items (assignments, calendar events) across all courses. Canvas returns roughly the next two weeks."""
        return _get("/api/v1/users/self/upcoming_events")
  • Registration via @mcp.tool() decorator from FastMCP, which registers 'upcoming_events' as an MCP tool.
    @mcp.tool()
  • Helper function _get() that executes the actual HTTP GET request to the Canvas API, handling pagination via Link headers.
    def _get(path: str, **params) -> Any:
        params.setdefault("per_page", 100)
        url = f"{BASE}{path}"
        out = []
        with httpx.Client(headers=HEAD, timeout=30) as c:
            while url:
                r = c.get(url, params=params)
                r.raise_for_status()
                data = r.json()
                if isinstance(data, list):
                    out.extend(data)
                else:
                    return data
                url = None
                params = {}
                link = r.headers.get("Link", "")
                for part in link.split(","):
                    if 'rel="next"' in part:
                        url = part[part.find("<")+1:part.find(">")]
        return out
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral traits. It discloses the time window (next two weeks) and scope (all courses), but does not mention whether it's read-only, how items are ordered, or any other side effects. Adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences that front-load the essential information. Every sentence adds value: first describes content, second adds time context. No wasted words.

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 zero parameters, no annotations, and presence of an output schema, the description covers the essential context (what items, scope, time range). It could mention ordering or format, but output schema likely handles that. Complete for a simple list tool without missing crucial gaps.

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 input schema has zero parameters, so schema coverage is trivially 100%. Per rule, no parameters baseline is 4. The description does not need to add parameter information.

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?

Description clearly specifies the tool returns upcoming planner items (assignments, calendar events) across all courses with a time window. It distinguishes from siblings like 'planner_items' by emphasizing the 'across all courses' scope and the 'roughly next two weeks' range.

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 context (returns upcoming items across courses with a time limit) but does not explicitly state when to use this tool versus alternatives like 'planner_items' or 'todo'. No exclusion criteria or when-not-to-use guidance provided.

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