Skip to main content
Glama

get_item

Retrieve complete metadata for a Zotero library item including title, authors, abstract, publication details, and related collections using its unique identifier.

Instructions

Get full metadata for a single Zotero item.

Args: item_key: The Zotero item key

Returns: JSON with complete item metadata including title, creators, abstract, date, DOI, URL, tags, and collections.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
item_keyYes

Implementation Reference

  • The MCP tool handler for 'get_item'. This function is decorated with @mcp_server.tool() which registers it as an MCP tool. It takes an item_key parameter and delegates to db.get_item() for the actual implementation.
    @mcp_server.tool()
    def get_item(item_key: str) -> str:
        """Get full metadata for a single Zotero item.
    
        Args:
            item_key: The Zotero item key
    
        Returns:
            JSON with complete item metadata including title, creators, abstract, date, DOI, URL, tags, and collections.
        """
        return db.get_item(item_key)
  • The core implementation logic for get_item. Fetches a single Zotero item by key using pyzotero, handles errors, and returns the item metadata as JSON.
    def get_item(item_key: str) -> str:
        """Full metadata for a single item."""
        try:
            zot = _get_zot()
            item = zot.item(item_key)
        except Exception as e:
            return json.dumps({"error": f"Failed to fetch item {item_key}: {e}"})
    
        return json.dumps(_item_to_dict(item, truncate_abstract=0))
  • Creates the FastMCP server instance 'mcp_server' which is used to register all MCP tools via the @mcp_server.tool() decorator.
    mcp_server = FastMCP(MCP_SERVER_NAME)

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/eric-tramel/zoty'

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