get_conversation_details
Retrieve detailed Canvas conversation information including messages by providing the conversation ID, with options to automatically mark as read and include all messages.
Instructions
Get detailed conversation information with messages.
Args:
conversation_id: ID of the conversation to retrieve
auto_mark_read: Automatically mark conversation as read when viewed
include_messages: Include all messages in the conversation
Returns:
Detailed conversation information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auto_mark_read | No | ||
| conversation_id | Yes | ||
| include_messages | No |
Implementation Reference
- The handler function for the 'get_conversation_details' tool. It retrieves detailed information about a specific Canvas conversation, optionally marking it as read, using the Canvas API. The function is decorated with @mcp.tool() for automatic registration.@mcp.tool() async def get_conversation_details( conversation_id: str | int, auto_mark_read: bool = True, include_messages: bool = True ) -> dict[str, Any]: """ Get detailed conversation information with messages. Args: conversation_id: ID of the conversation to retrieve auto_mark_read: Automatically mark conversation as read when viewed include_messages: Include all messages in the conversation Returns: Detailed conversation information """ try: params = { "auto_mark_as_read": auto_mark_read, "include_all_conversation_ids": True } response = await make_canvas_request( "get", f"/conversations/{conversation_id}", params=params ) if "error" in response: return response return { "success": True, "conversation": response } except Exception as e: print(f"Error getting conversation details: {str(e)}", file=sys.stderr) return {"error": f"Failed to get conversation details: {str(e)}"}