Skip to main content
Glama

chroma_update_documents

Modify documents in a Chroma collection by updating embeddings, metadatas, or text content. Ensure data integrity by matching input IDs with provided updates for accurate modifications.

Instructions

Update documents in a Chroma collection.

Args:
    collection_name: Name of the collection to update documents in
    ids: List of document IDs to update (required)
    embeddings: Optional list of new embeddings for the documents.
                Must match length of ids if provided.
    metadatas: Optional list of new metadata dictionaries for the documents.
               Must match length of ids if provided.
    documents: Optional list of new text documents.
               Must match length of ids if provided.

Returns:
    A confirmation message indicating the number of documents updated.

Raises:
    ValueError: If 'ids' is empty or if none of 'embeddings', 'metadatas',
                or 'documents' are provided, or if the length of provided
                update lists does not match the length of 'ids'.
    Exception: If the collection does not exist or if the update operation fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collection_nameYes
documentsNo
embeddingsNo
idsYes
metadatasNo
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing key behaviors: it's a mutation tool (implied by 'Update'), specifies error conditions (raises ValueError for invalid inputs, Exception for failures), and describes the return value (confirmation message). It could improve by mentioning side effects like overwriting existing data or performance implications.

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 clear sections (Args, Returns, Raises) and front-loaded purpose. It's appropriately sized for a 5-parameter tool, though some sentences could be more concise (e.g., the Raises section is verbose). Overall, it efficiently conveys necessary information without redundancy.

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 the complexity (5 parameters, no annotations, no output schema), the description is mostly complete: it covers parameters, errors, and returns. However, it lacks details on the update mechanism (e.g., partial vs. full updates) and doesn't reference sibling tools for context, leaving minor gaps in full agent guidance.

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?

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains each parameter's purpose (e.g., 'ids: List of document IDs to update'), constraints (e.g., 'Must match length of ids if provided'), and relationships between parameters. This fully compensates for the schema's lack of descriptions.

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 action ('Update documents') and resource ('in a Chroma collection'), making the purpose immediately understandable. It distinguishes from siblings like 'chroma_add_documents' (adds new) and 'chroma_delete_documents' (removes), though not explicitly named. However, it doesn't fully differentiate from 'chroma_modify_collection' which might overlap in functionality.

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 through the parameter documentation (e.g., 'ids' are required, update lists must match length), suggesting when to use it for updating existing documents. However, it lacks explicit guidance on when to choose this tool over alternatives like 'chroma_modify_collection' or 'chroma_add_documents', and doesn't mention prerequisites such as collection existence.

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