flatten_discussion_thread
Flattens a Canvas discussion thread into a depth-first list with depth values so agents can read posts end-to-end without expanding replies.
Instructions
Get a discussion as a flat depth-first list instead of a nested tree.
Each entry gets a depth field so the agent can reconstruct indentation
without re-walking the tree. Useful for reading a discussion end-to-end
in order rather than clicking through "show replies" on every node.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic_id | Yes | ||
| course_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |