Skip to main content
Glama

get_unread_count

Retrieve the number of unread conversations in Canvas to monitor communication updates and manage message priorities.

Instructions

Get number of unread conversations. Returns: Unread conversation count

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'get_unread_count' tool. It makes a GET request to Canvas API endpoint '/conversations/unread_count', handles errors, and returns the unread count or error message.
    @mcp.tool() async def get_unread_count() -> dict[str, Any]: """ Get number of unread conversations. Returns: Unread conversation count """ try: response = await make_canvas_request("get", "/conversations/unread_count") if "error" in response: return response return { "success": True, "unread_count": response.get("unread_count", 0) } except Exception as e: print(f"Error getting unread count: {str(e)}", file=sys.stderr) return {"error": f"Failed to get unread count: {str(e)}"}
  • The registration call within register_all_tools() that invokes the messaging tools registration, which defines and registers the get_unread_count tool via its @mcp.tool() decorator.
    register_messaging_tools(mcp)
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