get_collection_items
Retrieve bibliographic items from a specific Zotero collection to access and organize research materials.
Instructions
List items in a specific Zotero collection
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection_key | Yes | ||
| limit | No |
Implementation Reference
- src/zotero_mcp/server.py:84-88 (handler)The MCP tool registration and entry point for 'get_collection_items'. It calls the underlying client to retrieve items.
@mcp.tool(description="List items in a specific Zotero collection") def get_collection_items(collection_key: str, limit: int = 100) -> str: """Get items within a collection by its key.""" results = _get_client().get_collection_items(collection_key, limit) return json.dumps(results, ensure_ascii=False) - src/zotero_mcp/client.py:76-81 (handler)The actual logic implementation in the ZoteroClient class that interacts with the pyzotero library to fetch collection items.
def get_collection_items(self, collection_key: str, limit: int = 100) -> list[dict]: """Get items in a specific collection.""" items = self.zot.collection_items( collection_key, limit=limit, itemType="-attachment || note" ) return [self._format_item_summary(item) for item in items]