Skip to main content
Glama

canvas_list_discussion_topics

Retrieve all discussion topics within a specific course using the Canvas MCP Server V2.0, enabling efficient management and review of course-related discussions.

Instructions

List all discussion topics in a course

Input Schema

NameRequiredDescriptionDefault
course_idYesID of the course

Input Schema (JSON Schema)

{ "properties": { "course_id": { "description": "ID of the course", "type": "number" } }, "required": [ "course_id" ], "type": "object" }

Implementation Reference

  • src/index.ts:521-529 (registration)
    Registers the canvas_list_discussion_topics tool including its name, description, and input schema that requires a course_id.
    name: "canvas_list_discussion_topics", description: "List all discussion topics in a course", inputSchema: { type: "object", properties: { course_id: { type: "number", description: "ID of the course" } }, required: ["course_id"] }
  • Core handler function in CanvasClient that makes the API request to retrieve discussion topics for a given course, including related assignments.
    async listDiscussionTopics(courseId: number): Promise<CanvasDiscussionTopic[]> { const response = await this.client.get(`/courses/${courseId}/discussion_topics`, { params: { include: ['assignment'] } }); return response.data; }
  • TypeScript interface defining the structure of Canvas discussion topics returned by the tool.
    export interface CanvasDiscussionTopic { id: number; title: string; message: string; html_url: string; posted_at: string; assignment_id: number | null; assignment?: CanvasAssignment; discussion_type: string; require_initial_post: boolean; user_has_posted: boolean; discussion_subentry_count: number; read_state: 'read' | 'unread'; unread_count: number; }
  • Handler for reading discussion topics as a resource (discussions://{course.id}), which calls the same underlying client method.
    content = await this.client.listDiscussionTopics(parseInt(id)); break;

Other Tools

Related 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/DMontgomery40/mcp-canvas-lms'

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