list_discussion_topics to discover which discussions exist in a course, then pass a topic ID to get_discussion_entries to read the full thread with replies and participant metadata.
list_discussion_topics
Lists discussion topics in a course. The tool merges results from the Canvas discussions API and the assignments API so that graded discussions backed by assignments are always included. Announcements are excluded by default.
Parameters
The Canvas course ID. Obtain this from
list_courses or resolve_course.Substring filter applied to topic titles (or titles and message bodies when
search_in is title_or_message). Case-insensitive. When exact_title is true, this value is compared as a case-folded exact match instead.When
true, search is treated as a case-insensitive exact title match instead of a substring search. Has no effect when search is omitted.Controls which fields the
search substring is matched against. Accepted values: title (default) or title_or_message.When
true, only topics that have an associated assignment_id (i.e., graded discussions) are returned.When
true, announcement topics are included alongside regular discussion topics. By default they are filtered out.Maximum number of topics to return. Accepted range: 1–300.
search and exact_title interact: set exact_title: true to match "Week 1 Discussion" exactly, or omit it to match anything containing "week 1" in the title.Return value
The course ID as provided.
Number of topics returned after filtering.
Echo of the active filter values:
search, search_in, exact_title, only_graded, include_announcements.Examples
get_discussion_entries
Fetches the full thread view for a single discussion topic, including top-level entries, nested replies, and participant metadata. The tool resolves the topic by ID or by assignment ID alias, so you can pass either a discussion topic ID or an assignment ID if the discussion is graded.
Parameters
The Canvas course ID.
The discussion topic ID. Obtain this from
list_discussion_topics. You may also pass an assignment ID for graded discussions — the tool resolves the linked topic automatically.When
true (the default), nested replies are included under each top-level entry.When
true (the default), a participants array is included with the display name, avatar URL, and pronoun fields for every user who posted in the thread.Maximum number of top-level entries to return. Accepted range: 1–300. Replies nested under each entry are not counted against this limit.
Return value
The course ID as provided.
The
topic_id as supplied to the call.The canonical topic ID that Canvas returned entries for. May differ from
requested_topic_id when an assignment ID was passed.Set when an assignment ID was passed and the tool resolved it to a discussion topic ID.
Number of unique participants returned in the
participants array.User objects with
id, display_name, avatar_image_url, html_url, and pronouns. Only populated when include_participants is true.Number of top-level entries in the
entries array (after the limit is applied).Total count including all nested replies across every entry.
Top-level post objects. Each entry contains its author ID, message, created timestamp, and a
replies array when include_replies is true.