Skip to main content
Glama

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
NameRequiredDescriptionDefault
conversation_idYes
auto_mark_readNo
include_messagesNo

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)}"}
Install Server

Other 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/vishalsachdev/canvas-mcp'

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