search_within_item
Search for keywords inside selected Zotero items and retrieve ranked passage matches with snippets and scores. Compare relevance across multiple items in one call to pinpoint the most relevant sections.
Instructions
Find which passages within one or more known items match a keyword query.
Use after search_library to drill into one paper, or compare passage-level
relevance across several papers in a single call. The public interface uses
item_keys as the canonical key input.
Args:
item_keys: Zotero parent item keys to search within. Use the key
field from search_library, list_collection_items, or
get_recent_items results (for example, X9KJ2M4P).
query: Search keywords to match against those items' metadata and attachment chunks
limit: Requested passage matches to return (default: 5, capped at
25). The response includes requested_limit, applied_limit,
limit_cap, and limit_capped so callers can detect clamping.
Returns:
JSON with ranked passage matches, including score,
match_type, snippet, chunk_index, char_start, and
char_end for every hit. When a match comes from an attachment
chunk, it also includes attachment_key and attachment_title so
you can identify the source attachment without leaking local file
paths. Single-item calls return key and item; multi-item calls
return item_keys and items, where each item summary includes
key, title, itemType, returned_match_count, top_score, and
top_match_type so agents can compare relevance across the requested
items without extra calls. Matches omit the redundant parent title
and itemType, and include parent key only for multi-item calls.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item_keys | Yes | ||
| query | Yes | ||
| limit | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |