Skip to main content
Glama

chroma_modify_collection

Update the name or metadata of a Chroma collection to maintain accurate and relevant data organization for efficient retrieval and management within the Chroma MCP Server.

Instructions

Modify a Chroma collection's name or metadata.

Args:
    collection_name: Name of the collection to modify
    new_name: Optional new name for the collection
    new_metadata: Optional new metadata for the collection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collection_nameYes
new_metadataNo
new_nameNo

Implementation Reference

  • The primary handler function for the 'chroma_modify_collection' tool. It retrieves the collection using get_chroma_client(), calls collection.modify() with optional new_name and/or new_metadata, determines modified aspects, and returns a success message. Decorated with @mcp.tool() for automatic registration and schema inference.
    @mcp.tool()
    async def chroma_modify_collection(
        collection_name: str,
        new_name: str | None = None,
        new_metadata: Dict | None = None,
    ) -> str:
        """Modify a Chroma collection's name or metadata.
        
        Args:
            collection_name: Name of the collection to modify
            new_name: Optional new name for the collection
            new_metadata: Optional new metadata for the collection
        """
        client = get_chroma_client()
        try:
            collection = client.get_collection(collection_name)
            collection.modify(name=new_name, metadata=new_metadata)
            
            modified_aspects = []
            if new_name:
                modified_aspects.append("name")
            if new_metadata:
                modified_aspects.append("metadata")
            
            return f"Successfully modified collection {collection_name}: updated {' and '.join(modified_aspects)}"
        except Exception as e:
            raise Exception(f"Failed to modify collection '{collection_name}': {str(e)}") from e
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool modifies collection attributes, implying mutation, but lacks critical behavioral details: whether changes are reversible, required permissions, error conditions (e.g., if collection doesn't exist), or side effects. This is inadequate for a mutation tool with zero annotation coverage.

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: the first sentence states the purpose clearly, followed by a concise parameter list. There's no wasted text, and the structure is logical. However, the parameter explanations are minimal and could be more informative without sacrificing brevity.

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 (mutation tool with 3 parameters), lack of annotations, and no output schema, the description is incomplete. It covers basic purpose and parameters but misses behavioral context (e.g., effects, errors), usage guidelines, and output details. For a tool that modifies data, this leaves significant gaps for an AI agent.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It lists all three parameters with brief explanations ('Name of the collection to modify', 'Optional new name', 'Optional new metadata'), adding basic meaning beyond the schema's titles. However, it doesn't elaborate on metadata format, name constraints, or interaction between parameters, leaving gaps in understanding.

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 tool's purpose: 'Modify a Chroma collection's name or metadata.' It specifies the verb ('modify') and resource ('Chroma collection'), and indicates what can be modified. However, it doesn't explicitly differentiate from sibling tools like 'chroma_update_documents' or 'chroma_fork_collection', which might also involve modifications.

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. It doesn't mention prerequisites (e.g., collection must exist), exclusions (e.g., cannot modify certain attributes), or comparisons to siblings like 'chroma_fork_collection' or 'chroma_update_documents'. Usage is implied only by the tool name and purpose.

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