Skip to main content
Glama

search_items

Find items in your Zotero library using search queries and filters for collections, item types, or tags to locate specific references.

Instructions

Search items in Zotero library with optional filters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
collection_keyNo
item_typeNo
tagNo
limitNo

Implementation Reference

  • The MCP tool definition for 'search_items' which calls the ZoteroClient.
    def search_items(
        query: str,
        collection_key: str = "",
        item_type: str = "",
        tag: str = "",
        limit: int = 25,
    ) -> str:
        """Search for items by keyword with optional collection, type, and tag filters."""
        results = _get_client().search_items(query, collection_key, item_type, tag, limit)
        return json.dumps(results, ensure_ascii=False)
  • The implementation of the search logic in ZoteroClient using pyzotero.
    def search_items(
        self,
        query: str,
        collection_key: str = "",
        item_type: str = "",
        tag: str = "",
        limit: int = 25,
    ) -> list[dict]:
        """Full-text search with optional filters."""
        kwargs = {"q": query, "limit": limit, "itemType": "-attachment || note"}
        if item_type:
            kwargs["itemType"] = item_type
        if tag:
            kwargs["tag"] = tag
    
        if collection_key:
            items = self.zot.collection_items(collection_key, **kwargs)
        else:
            items = self.zot.items(**kwargs)
    
        return [self._format_item_summary(item) for item in items]

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