Skip to main content
Glama

update_item

Modify existing Zotero bibliographic entries by updating specific fields to maintain accurate research references.

Instructions

Update fields on an existing Zotero item

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
item_keyYes
fieldsYes

Implementation Reference

  • MCP tool handler that exposes update_item to the MCP protocol.
    @mcp.tool(description="Update fields on an existing Zotero item")
    def update_item(item_key: str, fields: dict) -> str:
        """Update item metadata. Uses read-modify-write with version check."""
        result = _get_client().update_item(item_key, fields)
        return json.dumps(result, ensure_ascii=False)
  • Core logic for updating a Zotero item using the pyzotero client.
    def update_item(self, item_key: str, fields: dict) -> dict:
        """Update item fields with version check. Returns {key, version}."""
        item = self.zot.item(item_key)
        for field, value in fields.items():
            item["data"][field] = value
        self.zot.update_item(item)
        return {"key": item_key, "version": item["data"].get("version", 0)}

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