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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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]
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states the tool searches with filters but doesn't disclose behavioral traits such as pagination behavior (implied by 'limit' parameter), rate limits, authentication needs, or what happens with empty results. For a search tool with 5 parameters and no annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste—'Search items in Zotero library with optional filters'—front-loading the core action and key feature. Every word earns its place, making it appropriately sized and well-structured for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (5 parameters, 1 required), no annotations, and an output schema (which handles return values), the description is incomplete. It covers the basic purpose but lacks details on usage context, behavioral traits, and parameter meanings. The output schema reduces the need to explain returns, but the description should do more to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema provides no parameter details. The description adds minimal semantics by mentioning 'optional filters', which hints at parameters like 'collection_key', 'item_type', and 'tag', but doesn't explain their meanings, formats, or interactions. It doesn't compensate for the low coverage, resulting in a baseline score due to inadequate parameter clarification.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('search') and resource ('items in Zotero library'), making the purpose understandable. It distinguishes from siblings like 'get_item' (single item retrieval) and 'get_collection_items' (collection-specific retrieval) by emphasizing search with filters. However, it doesn't explicitly differentiate from 'find_duplicates' (which might also search) or specify search scope beyond 'library'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions 'optional filters' but provides no guidance on when to use this tool versus alternatives like 'get_collection_items' (for items in a specific collection) or 'get_item' (for a known item). It lacks explicit when/when-not instructions or prerequisites, leaving usage context implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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