search_library
Search your Zotero library with keyword queries to find items by title, abstract, or attachment text. Ranked by BM25 relevance, supports filtering by collection and item type, returns metadata including creators, date, and attachment count.
Instructions
Find which items in your Zotero library match a keyword query.
Uses BM25 ranking over title, abstract, and indexed attachment full text.
Args:
query: Search keywords (e.g. "transformer attention" not "what papers discuss attention?")
collection_key: Optional Zotero collection key to filter results
item_type: Optional case-insensitive Zotero parent itemType filter.
Canonical values are surfaced in the tool schema and description,
and values not present in the current search index return no
items plus a warning instead of silently filtering everything
out.
limit: Requested results to return (default: 10, capped at 25).
limit=0 returns no items, while the response still reports
total and returned_count so callers can see how many results
matched and how many were actually included under items.
include_attachments: Include resolved attachment metadata in each
returned item. Defaults to False; otherwise attachment_count
is still present without the heavier attachment array.
Returns:
JSON with ranked Zotero items under items, including key, title,
creators, date, score, abstract text truncated to 500 characters,
attachment_count, collections as {key, name} pairs, optional
attachments when include_attachments=True (each attachment keeps
only safe summary fields such as key, title, contentType, and
linkMode), optional plain-text snippets, warnings for invalid
collection_key / item_type filters or empty queries, and limit
metadata. Duplicate parent items that share a DOI or URL are
collapsed before limiting, preferring the richer record when
duplicates exist. total reports the deduplicated match count and
returned_count reports how many items were actually returned.
Canonical item_type values: artwork, audioRecording, bill, blogPost, book, bookSection, case, computerProgram, conferencePaper, dataset, dictionaryEntry, document, email, encyclopediaArticle, film, forumPost, hearing, instantMessage, interview, journalArticle, letter, magazineArticle, manuscript, map, newspaperArticle, patent, podcast, preprint, presentation, radioBroadcast, report, standard, statute, thesis, tvBroadcast, videoRecording, webpage. If the requested value is not present in the current search index, the response returns no items and a warning. Duplicate parent items that share a DOI or URL are collapsed before limiting, preferring the richer record when duplicates exist. Response metadata includes returned_count for the items included under items and total for the deduplicated match count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| collection_key | No | ||
| item_type | No | Optional case-insensitive Zotero parent itemType filter. Canonical values are `artwork`, `audioRecording`, `bill`, `blogPost`, `book`, `bookSection`, `case`, `computerProgram`, `conferencePaper`, `dataset`, `dictionaryEntry`, `document`, `email`, `encyclopediaArticle`, `film`, `forumPost`, `hearing`, `instantMessage`, `interview`, `journalArticle`, `letter`, `magazineArticle`, `manuscript`, `map`, `newspaperArticle`, `patent`, `podcast`, `preprint`, `presentation`, `radioBroadcast`, `report`, `standard`, `statute`, `thesis`, `tvBroadcast`, `videoRecording`, `webpage`. If the requested value is not present in the current search index, the response returns no items and a warning. | |
| limit | No | Requested results to return. Values below 0 are treated as 0, values above 25 are clamped to 25, and the response reports `requested_limit`, `applied_limit`, `limit_cap`, and `limit_capped`. | |
| include_attachments | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |