Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
item_keysYes
queryYes
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description fully discloses important behaviors: limit clamping at 25, response includes clamping indicators, return structure for single vs multi-item calls, attachment info without leaking local paths, and omission of redundant fields. No contradictions.

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

Conciseness4/5

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

The description is well-structured with a clear first sentence, an Args section, and detailed return info. While somewhat lengthy, every sentence provides value and the structure aids readability.

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

Completeness5/5

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

Given the tool's complexity (3 parameters, rich return structure) and presence of output schema, the description covers all necessary aspects: parameter sources, limit behavior, and response format distinctions. No missing information.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must add all parameter meaning. It explains `item_keys` as Zotero keys from specific sources, `query` as keywords for metadata and attachments, and `limit` with default and cap. This fully compensates for absent schema descriptions.

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

Purpose5/5

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

The description clearly states the tool finds passages within known items matching a keyword query, with specific verb 'find' and resource 'passages within items'. It distinguishes from sibling `search_library` by positioning itself as a drill-down tool.

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

Usage Guidelines4/5

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

The description explicitly says to use after `search_library` to drill into one paper or compare across several papers, providing clear usage context. It lacks explicit when-not-to-use guidance but the context is sufficient.

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

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