Skip to main content
Glama
zwczwczwc

Chroma MCP Server

by zwczwczwc

chroma_query_documents

Find relevant documents in a Chroma collection by combining vector search with metadata and document content filters.

Instructions

Query documents from a Chroma collection with advanced filtering.

Args:
    collection_name: Name of the collection to query
    query_texts: List of query texts to search for
    n_results: Number of results to return per query
    where: Optional metadata filters using Chroma's query operators
           Examples:
           - Simple equality: {"metadata_field": "value"}
           - Comparison: {"metadata_field": {"$gt": 5}}
           - Logical AND: {"$and": [{"field1": {"$eq": "value1"}}, {"field2": {"$gt": 5}}]}
           - Logical OR: {"$or": [{"field1": {"$eq": "value1"}}, {"field1": {"$eq": "value2"}}]}
    where_document: Optional document content filters
           Examples:
           - Contains: {"$contains": "value"}
           - Not contains: {"$not_contains": "value"}
           - Regex: {"$regex": "[a-z]+"}
           - Not regex: {"$not_regex": "[a-z]+"}
           - Logical AND: {"$and": [{"$contains": "value1"}, {"$not_regex": "[a-z]+"}]}
           - Logical OR: {"$or": [{"$regex": "[a-z]+"}, {"$not_contains": "value2"}]}
    include: List of what to include in response. By default, this will include documents, metadatas, and distances.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
whereNo
includeNo
n_resultsNo
query_textsYes
where_documentNo
collection_nameYes
Behavior4/5

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

No annotations are provided, so the description bears the full burden. It discloses default response fields (documents, metadatas, distances), supported filter operators with examples, and use of n_results for pagination. However, it lacks details on rate limits, maximum result limits, or side effects.

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 a well-structured docstring that front-loads the purpose and then systematically describes each parameter. While it includes many examples that increase length, these are necessary for complex parameters and are not redundant.

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

Completeness4/5

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

Given 6 parameters, no output schema, and no annotations, the description covers all parameters with examples. It mentions the default include list but does not detail the response structure beyond field names. The tool's purpose is clear, but some behavioral details are omitted.

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

Parameters5/5

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

Schema description coverage is 0%, and the description adds substantial meaning to all 6 parameters, especially for complex fields where and where_document, providing detailed examples of supported operators and logical combinations. This goes far beyond the schema's type and default information.

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

Purpose5/5

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

The description clearly states the action 'Query documents from a Chroma collection with advanced filtering,' with a specific verb and resource. It distinguishes from siblings like add, get, update, delete documents by focusing on querying with filtering.

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

Usage Guidelines3/5

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

The description implies usage for querying with advanced filtering but provides no explicit guidance on when to use this tool versus alternatives like get_documents or peek_collection. No when-not-to-use or alternative naming is given.

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

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