Skip to main content
Glama

chroma_list_collections

Retrieve paginated collection names from the Chroma database. Specify limit and offset to manage large datasets. Returns list of names or indicates if no collections exist.

Instructions

List all collection names in the Chroma database with pagination support.

Args: limit: Optional maximum number of collections to return offset: Optional number of collections to skip before returning results Returns: List of collection names or ["__NO_COLLECTIONS_FOUND__"] if database is empty

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo

Implementation Reference

  • The core handler function for the 'chroma_list_collections' tool. It uses the @mcp.tool() decorator for registration and FastMCP handles schema from type hints and docstring. Retrieves paginated list of Chroma collection names.
    @mcp.tool() async def chroma_list_collections( limit: int | None = None, offset: int | None = None ) -> List[str]: """List all collection names in the Chroma database with pagination support. Args: limit: Optional maximum number of collections to return offset: Optional number of collections to skip before returning results Returns: List of collection names or ["__NO_COLLECTIONS_FOUND__"] if database is empty """ client = get_chroma_client() try: colls = client.list_collections(limit=limit, offset=offset) # Safe handling: If colls is None or empty, return a special marker if not colls: return ["__NO_COLLECTIONS_FOUND__"] # Otherwise iterate to get collection names return [coll.name for coll in colls] except Exception as e: raise Exception(f"Failed to list collections: {str(e)}") from e

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/chroma-core/chroma-mcp'

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