Skip to main content
Glama

chroma_get_collection_info

Retrieve detailed information about a specific collection within the Chroma MCP Server, enabling users to analyze and manage data more effectively.

Instructions

Get information about a Chroma collection.

Args:
    collection_name: Name of the collection to get info about

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collection_nameYes

Implementation Reference

  • The main handler function for the 'chroma_get_collection_info' tool. It retrieves the collection using the Chroma client, gets the document count, peeks at sample documents, and returns a dictionary with name, count, and sample documents. The @mcp.tool() decorator registers this function as an MCP tool.
    @mcp.tool()
    async def chroma_get_collection_info(collection_name: str) -> Dict:
        """Get information about a Chroma collection.
        
        Args:
            collection_name: Name of the collection to get info about
        """
        client = get_chroma_client()
        try:
            collection = client.get_collection(collection_name)
            
            # Get collection count
            count = collection.count()
            
            # Peek at a few documents
            peek_results = collection.peek(limit=3)
            
            return {
                "name": collection_name,
                "count": count,
                "sample_documents": peek_results
            }
        except Exception as e:
            raise Exception(f"Failed to get collection info for '{collection_name}': {str(e)}") from e
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 states the action but doesn't cover important traits like whether this is a read-only operation, what specific information is returned (e.g., metadata, count, settings), error conditions, or performance implications. This leaves significant gaps for an agent to understand the tool's behavior.

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 appropriately sized and front-loaded with the main purpose in the first sentence, followed by parameter details. There's no wasted text, though it could be slightly more structured (e.g., using bullet points).

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

Completeness2/5

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

Given the complexity of interacting with a database collection and the lack of annotations and output schema, the description is incomplete. It doesn't explain what information is returned (e.g., metadata, statistics) or how errors are handled, which is critical for an agent to use this tool effectively in context with its siblings.

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

Parameters4/5

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

The description adds meaningful context for the single parameter by specifying 'Name of the collection to get info about', which clarifies its role beyond the schema's basic title 'Collection Name'. Since schema description coverage is 0%, this compensates well, though it doesn't detail format constraints or examples.

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 'Get information about' and the resource 'a Chroma collection', making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'chroma_peek_collection' or 'chroma_list_collections', which might provide overlapping functionality.

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 like 'chroma_peek_collection' or 'chroma_list_collections'. It lacks context about prerequisites, such as whether the collection must exist, or any exclusions for usage.

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

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

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