get_conversation_details
Retrieve detailed Canvas conversation information including messages, with options to automatically mark as read and include all message content.
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 |
|---|---|---|---|
| conversation_id | Yes | ||
| auto_mark_read | No | ||
| include_messages | No |
Implementation Reference
- The main handler function for the 'get_conversation_details' tool. It fetches conversation details from Canvas API, handles parameters like auto_mark_read, and returns formatted success/error responses. Registered via @mcp.tool() decorator.@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)}"}