Skip to main content
Glama

Zotero Update Search Database

zotero_update_search_database

Update the semantic search database for Zotero items incrementally after adding or changing items. Use force_rebuild to re-embed all items from scratch.

Instructions

Build or refresh the semantic search embedding database from Zotero items. Run this: (a) after first install, (b) after adding items via zotero_add_item, or (c) when the user has added items directly in Zotero desktop since the last update. By default the update is INCREMENTAL — only new or changed items are re-embedded, so repeated calls are cheap. force_rebuild=True re-embeds ALL items from scratch (slow; use when changing the embedding model or recovering from corruption). limit: optional cap on items processed (useful for smoke-testing). Progress is reported via the MCP context; on large libraries an incremental update is seconds, a full rebuild can take minutes. Requires the [semantic] optional dependency and a configured embedding provider (see config.json). Check status with zotero_get_search_database_status. Example: zotero_update_search_database() after adding a batch of papers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoLimit number of items to process (useful for testing)
force_rebuildNoWhether to rebuild the entire database from scratch

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries full burden. It discloses incremental vs full-rebuild behavior, performance expectations (seconds vs minutes), dependency requirements ([semantic] and configured provider), progress reporting via MCP context, and even the purpose of the limit parameter for smoke-testing. This is comprehensive behavioral disclosure.

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 front-loaded with the core purpose, then uses numbered scenarios for readability. Every sentence adds value—trigger conditions, cost trade-offs, dependencies, and an example. No fluff; it is long but efficiently organized for a tool with this complexity.

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 (semantic indexing, incremental vs full rebuild, dependencies, performance), the description covers all critical aspects: when to run, how it behaves, prerequisites, progress reporting, and a status-check sibling. It also provides an example call. Nothing essential is missing for correct invocation.

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

Parameters4/5

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

Schema already covers both parameters with descriptions (100% coverage), so baseline is 3. The description adds operational meaning: force_rebuild is for changing models or corruption recovery, and limit is for smoke-testing. This extra context elevates it above the baseline.

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 states a specific verb ('Build or refresh'), a resource ('semantic search embedding database'), and source ('from Zotero items'). It clearly distinguishes from siblings by naming zotero_get_search_database_status and implying semantic_search is the consumer, so an agent can route correctly without opening schemas.

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

Usage Guidelines5/5

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

Explicitly lists three triggering conditions (first install, after zotero_add_item, after manual additions) and differentiates incremental vs force_rebuild with performance guidance. It also points to the sibling status tool for verification, leaving no ambiguity about when to call this versus alternatives.

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