Skip to main content
Glama

remove_from_collection

Remove a Zotero item from a collection without deleting it. Manage your research library by organizing items across collections.

Instructions

Remove a Zotero item from a collection (does not delete the item)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
item_keyYes
collection_keyYes

Implementation Reference

  • The MCP tool 'remove_from_collection' is registered here and delegates the work to the client.
    @mcp.tool(description="Remove a Zotero item from a collection (does not delete the item)")
    def remove_from_collection(item_key: str, collection_key: str) -> str:
        """Remove item from a collection without deleting it."""
        _get_client().remove_from_collection(item_key, collection_key)
        return json.dumps({"item_key": item_key, "removed_from": collection_key}, ensure_ascii=False)
  • The actual logic to remove an item from a Zotero collection by modifying the 'collections' list of the item and updating the item in Zotero.
    def remove_from_collection(self, item_key: str, collection_key: str) -> bool:
        """Remove item from a collection. Returns True on success."""
        item = self.zot.item(item_key)
        cols = item["data"].get("collections", [])
        if collection_key in cols:
            cols.remove(collection_key)
            item["data"]["collections"] = cols
            self.zot.update_item(item)
        return True

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/BirdInTheTree/zotero-mcp'

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