Skip to main content
Glama

list_conversations

Retrieve and filter user conversations in Canvas LMS by scope, IDs, or participants to organize and access message threads.

Instructions

    List conversations for the current user.

    Args:
        scope: Conversation scope ("unread", "starred", "sent", "archived", or "all")
        filter_ids: Optional list of conversation IDs to filter by
        filter_mode: How to apply filter_ids ("and" or "or")
        include_participants: Include participant information
        include_all_ids: Include all conversation participant IDs

    Returns:
        List of conversations
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNounread
filter_idsNo
filter_modeNoand
include_participantsNo
include_all_idsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'list_conversations' tool. It validates input parameters, constructs API parameters, calls the Canvas conversations API endpoint, and returns formatted results or errors.
    @mcp.tool()
    async def list_conversations(
        scope: str = "unread",
        filter_ids: list[str] | None = None,
        filter_mode: str = "and",
        include_participants: bool = True,
        include_all_ids: bool = False
    ) -> dict[str, Any]:
        """
        List conversations for the current user.
    
        Args:
            scope: Conversation scope ("unread", "starred", "sent", "archived", or "all")
            filter_ids: Optional list of conversation IDs to filter by
            filter_mode: How to apply filter_ids ("and" or "or")
            include_participants: Include participant information
            include_all_ids: Include all conversation participant IDs
    
        Returns:
            List of conversations
        """
    
        valid_scopes = ["unread", "starred", "sent", "archived", "all"]
        if scope not in valid_scopes:
            return {"error": f"scope must be one of: {', '.join(valid_scopes)}"}
    
        try:
            params = {
                "scope": scope,
                "include_participants": include_participants,
                "include_all_conversation_ids": include_all_ids
            }
    
            if filter_ids:
                params["filter[]"] = filter_ids
                params["filter_mode"] = filter_mode
    
            response = await make_canvas_request("get", "/conversations", params=params)
    
            if "error" in response:
                return response
    
            return {
                "success": True,
                "conversations": response,
                "count": len(response) if isinstance(response, list) else 0
            }
    
        except Exception as e:
            print(f"Error listing conversations: {str(e)}", file=sys.stderr)
            return {"error": f"Failed to list conversations: {str(e)}"}
  • The registration call within register_all_tools that invokes register_messaging_tools(mcp), which defines and registers the list_conversations tool via @mcp.tool() decorator.
    register_messaging_tools(mcp)
  • The registration function that contains the @mcp.tool() decorator and definition for list_conversations.
    def register_messaging_tools(mcp: FastMCP) -> None:
  • Parameter type hints and docstring defining the tool schema for input validation and documentation.
    async def list_conversations(
        scope: str = "unread",
        filter_ids: list[str] | None = None,
        filter_mode: str = "and",
        include_participants: bool = True,
        include_all_ids: bool = False
    ) -> dict[str, Any]:
        """
        List conversations for the current user.
    
        Args:
            scope: Conversation scope ("unread", "starred", "sent", "archived", or "all")
            filter_ids: Optional list of conversation IDs to filter by
            filter_mode: How to apply filter_ids ("and" or "or")
            include_participants: Include participant information
            include_all_ids: Include all conversation participant IDs
    
        Returns:
            List of conversations
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the action ('List conversations') but fails to describe key traits such as permissions required, rate limits, pagination behavior, or whether it's a read-only operation. This leaves significant gaps in understanding how the tool behaves beyond its basic function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear purpose statement followed by parameter details and return information. It uses minimal sentences efficiently, though the 'Args' and 'Returns' sections could be more integrated into the flow. Overall, it is appropriately sized and front-loaded with essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (5 parameters, no annotations, but with an output schema), the description covers the basic purpose and parameters but lacks behavioral context and usage guidelines. The presence of an output schema means return values are documented elsewhere, but the description does not fully compensate for missing annotations or provide complete operational guidance.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description includes an 'Args' section that lists all parameters with brief explanations, adding meaning beyond the input schema (which has 0% description coverage). However, it does not provide detailed semantics like examples, constraints, or interactions between parameters (e.g., how 'filter_mode' applies to 'filter_ids'), resulting in adequate but incomplete parameter guidance.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('conversations for the current user'), making the purpose evident. However, it does not explicitly differentiate from sibling tools like 'get_conversation_details' or 'mark_conversations_read', which slightly limits its specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives (e.g., 'get_conversation_details' for specific conversations or 'mark_conversations_read' for updates). It lacks context about prerequisites or scenarios where this tool is preferred, offering only basic usage without comparative advice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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