Skip to main content
Glama

get_front_page

Retrieve the front page content for a Canvas course using the course code or ID to access syllabus, announcements, and key course information.

Instructions

Get the front page content for a course.

Args: course_identifier: The Canvas course code (e.g., badm_554_120251_246794) or ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_identifierYes

Implementation Reference

  • The main handler function for the 'get_front_page' tool. It resolves the course ID, fetches the front page content from the Canvas API endpoint '/courses/{course_id}/front_page', processes the response, and returns formatted content including title, body, and update date.
    @mcp.tool() @validate_params async def get_front_page(course_identifier: str | int) -> str: """Get the front page content for a course. Args: course_identifier: The Canvas course code (e.g., badm_554_120251_246794) or ID """ course_id = await get_course_id(course_identifier) response = await make_canvas_request("get", f"/courses/{course_id}/front_page") if "error" in response: return f"Error fetching front page: {response['error']}" title = response.get("title", "Untitled") body = response.get("body", "") updated_at = format_date(response.get("updated_at")) if not body: return f"Course front page '{title}' has no content." # Try to get the course code for display course_display = await get_course_code(course_id) or course_identifier return f"Front Page '{title}' for Course {course_display} (Updated: {updated_at}):\n\n{body}"
  • The call to register_other_tools(mcp) within register_all_tools, which triggers the registration of the get_front_page tool via its @mcp.tool() decorator.
    register_other_tools(mcp)

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